home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / AOCE / Development Tools / Interfaces / PInterfaces / OCEAuthDir.p < prev    next >
Encoding:
Text File  |  1993-11-10  |  148.0 KB  |  4,524 lines  |  [TEXT/MPS ]

  1. {***********************************************************
  2.  
  3. Created: Monday, November 8, 1993 11:46 AM
  4.  OCEAuthDir.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.   Copyright Apple Computer, Inc. 1990-1993
  8.   All rights reserved
  9.  
  10. ***********************************************************}
  11.  
  12.  
  13. {$IFC UNDEFINED UsingIncludes}
  14. {$SETC UsingIncludes:= 0}
  15. {$ENDC}
  16.  
  17. {$IFC NOT UsingIncludes}
  18.     UNIT OCEAuthDir;
  19.     INTERFACE
  20. {$ENDC}
  21.  
  22. {$IFC UNDEFINED UsingOCEAuthDir}
  23. {$SETC UsingOCEAuthDir:= 1}
  24.  
  25. {$I+}
  26. {$SETC OCEAuthDirIncludes:= UsingIncludes}
  27. {$SETC UsingIncludes:= 1}
  28.  
  29.  
  30. {$IFC UNDEFINED UsingAppleTalk}
  31. {$I $$Shell(PInterfaces)AppleTalk.p}
  32. {$ENDC}
  33.  
  34. {$IFC UNDEFINED UsingFiles}
  35. {$I $$Shell(PInterfaces)Files.p}
  36. {$ENDC}
  37.  
  38. {$IFC UNDEFINED UsingOCE}
  39. {$I OCE.p}
  40. {$ENDC}
  41.  
  42. {$IFC UNDEFINED UsingOSUtils}
  43. {$I $$Shell(PInterfaces)OSUtils.p}
  44. {$ENDC}
  45.  
  46.  
  47. {$IFC UNDEFINED UsingTypes}
  48. {$I $$Shell(PInterfaces)Types.p}
  49. {$ENDC}
  50.  
  51. {$SETC UsingIncludes:= OCEAuthDirIncludes}
  52.  
  53.  
  54.  
  55.  
  56. {***************************************************************************}
  57.  
  58. CONST
  59. kRC4KeySizeInBytes    = 8;        { size of an RC4 key }
  60. kRefNumUnknown        = 0;
  61.  
  62.  
  63.  
  64. kEnumDistinguishedNameBit = 0;
  65. kEnumAliasBit = 1;
  66. kEnumPseudonymBit = 2;
  67. kEnumDNodeBit = 3;
  68. kEnumInvisibleBit = 4;
  69. { Values of DirEnumChoices }
  70. kEnumDistinguishedNameMask    = $00000001;  {1<<kEnumDistinguishedNameBit}
  71. kEnumAliasMask                = $00000002;  {1<<kEnumAliasBit}
  72. kEnumPseudonymMask            = $00000004;  {1<<kEnumPseudonymBit}
  73. kEnumDNodeMask                = $00000008;  {1<<kEnumDNodeBit}
  74. kEnumInvisibleMask            = $00000010;  {1<<kEnumInvisibleBit}
  75.  
  76.  
  77. kEnumAllMask = (kEnumDistinguishedNameMask + kEnumAliasMask + kEnumPseudonymMask
  78.                 + kEnumDNodeMask + kEnumInvisibleMask);
  79.  
  80. TYPE
  81. DirEnumChoices = LONGINT;
  82.  
  83.  
  84. CONST
  85. { Values of DirSortOption }
  86. kSortByName        = 0;
  87. kSortByType        = 1;
  88.  
  89. { Values of DirSortDirection }
  90. kSortForwards    = 0;
  91. kSortBackwards    = 1;
  92.  
  93. { Values of DirMatchWith }
  94. kMatchAll        = 0;
  95. kExactMatch        = 1;
  96. kBeginsWith        = 2;
  97. kEndingWith        = 3;
  98. kContaining        = 4;
  99.  
  100. TYPE
  101. DirMatchWith = Byte;
  102.  
  103. CONST
  104. kCurrentOCESortVersion = 1;
  105.  
  106.  
  107. {  Access controls are implemented on three levels:
  108.           DNode, Record, and Attribute Type levels
  109.     Some access control bits apply to the container itself, and some apply to its contents.
  110.  
  111.     The Directory Toolbox supports six functions.  These calls are:
  112.     DSSetDNodeAccessControl : to set Access Controls at the DNode level
  113.     DSGetDNodeAccessControl : to get Access Controls at the DNode level
  114.     DSSetRecordAccessControl  : to set Access Controls at the record level
  115.     DSGetRecordAccessControl  : to get Access Controls at the record level
  116.     DSSetAttributeAccessControl : to set Access Privileges at the attribute type level
  117.     DSGetAttributeAccessControl : to get Access Privileges at the attribute type level
  118.  
  119.     The GetXXXAccessControl calls will return access control masks for various categories
  120.     of users.  Please refer to the access control document for a description of the
  121.     categories of users.  In general these are:
  122.         ThisRecordOwner         - means the identity of the record itself
  123.         Friends                  - means any one of the assigned friends for the record
  124.         AuthenticatedInDNode     - means any valid user that is an authenticated entity
  125.             in the DNode in which this record is located
  126.         AuthenticatedInDirectory - means any valid authenticated directory user
  127.         Guest                      - means an unauthenticated user.
  128.     Depending on the access control for the user (identity of the user),
  129.     a SetXXXAccessControl operation can be performed to set controls for various
  130.     categories of users described above.   Bit masks for various permitted access
  131.     controls are defined below.
  132.  
  133.     GetXXXAccessControl calls will return access control masks for various categories of
  134.     users for this record. In addition they also return the level of access controls
  135.     that the user (who is making the GetXXXAccessControl call) has for the DNode,
  136.     record, or attribute type.
  137.  
  138.     For records, the access control granted will be minimum of the DNode access
  139.     control and record access control masks.  For example, to add an attribute type to a
  140.     record, a user must have access control kCreateAttributeTypes at the record and
  141.     DNode levels.  Similarly, at the attribute type level, access controls will be the
  142.     minimum of the DNode, record, and attribute type access controls.
  143.  }
  144.  
  145. { access categories bit numbers }
  146. kThisRecordOwnerBit                = 0;
  147. kFriendsBit                        = 1;
  148. kAuthenticatedInDNodeBit        = 2;
  149. kAuthenticatedInDirectoryBit    = 3;
  150. kGuestBit                        = 4;
  151. kMeBit                            = 5;
  152.  
  153.  
  154.  
  155. { Values of CategoryMask }
  156. kThisRecordOwnerMask            = $00000001;  {1<<kThisRecordOwnerBit}
  157. kFriendsMask                     = $00000002;  {1<<kFriendsBit}
  158. kAuthenticatedInDNodeMask          = $00000004;  {1<<kAuthenticatedInDNodeBit}
  159. kAuthenticatedInDirectoryMask    = $00000008;  {1<<kAuthenticatedInDirectoryBit}
  160. kGuestMask                        = $00000010;  {1<<kGuestBit}
  161. kMeMask                            = $00000020;  {1<<kMeBit}
  162.  
  163.  
  164.  
  165. { access privileges bit numbers }
  166. kSeeBit            = 0;
  167. kAddBit            = 1;
  168. kDeleteBit        = 2;
  169. kChangeBit        = 3;
  170. kRenameBit        = 4;
  171. kChangePrivsBit    = 5;
  172. kSeeFoldersBit    = 6;
  173.  
  174.  
  175.  
  176. { Values of AccessMask }
  177. kSeeMask            = $00000001;    {1<<kSeeBit}
  178. kAddMask            = $00000002;    {1<<kAddBit}
  179. kDeleteMask            = $00000004;    {1<<kDeleteBit}
  180. kChangeMask            = $00000008;    {1<<kChangeBit}
  181. kRenameMask            = $00000010;    {1<<kRenameBit}
  182. kChangePrivsMask    = $00000020;    {1<<kChangePrivsBit}
  183. kSeeFoldersMask        = $00000040;    {1<<kSeeFoldersBit}
  184.  
  185.  
  186.  
  187. kAllPrivs    = (kSeeMask+kAddMask+kDeleteMask+kChangeMask+kRenameMask+kChangePrivsMask+kSeeFoldersMask);
  188. kNoPrivs    = 0;
  189.  
  190.  
  191.  
  192. {
  193.  
  194. kSupportsDNodeNumberBit:
  195. If this bit is set, a DNode can be referenced using DNodeNumbers.
  196. RecordLocationInfo can be specified using DNodeNumber and PathName component can be nil.
  197. If this bit is not set, a DNode can be referenced only by PathName to the DNode. In the
  198. later case DNodeNumber component inside record location info must be set to zero.
  199.  
  200. kSupportsRecordCreationIDBit:
  201. If this bit is set, a record can be referenced by specifying CreationID
  202. in most directory manager calls. If this bit is not set recordName and recordType are
  203. required in the recordID specification for all directory manager calls.
  204.  
  205. kSupportsAttributeCreationIDBit:
  206. If this bit is set, an attribute value can be obtained by specifying it's
  207. CreationID in Lookup call staring point and also can be used in operations
  208. like DeleteAttributeValue and ChangeAttributeValue an Attribute can be
  209. specified by AttributeType and CreationID.
  210.  
  211.  
  212. Following three bits are for determining the sort order in enumeration.
  213. kSupportsWildCardOnlyinEnumerationBit:
  214. If this bit is set, directory supports only wild card
  215. (i.e. recordName as "=").
  216.  
  217. kSupportsTrailingWildCardOnlyinEnumerationBit:
  218. This option is similar to "WildCardOnly",(i.e. recordName as "a=").
  219. If this is set, directory supports find capability (e.g. starts with option)
  220.  
  221. kSupportsExactMatchBit:
  222. If this bit is set, existence of a record matching exact recordName and recordType
  223. specification can be found.
  224.  
  225. The above three bits can be interpreted as:
  226. WildCardOnlyinEnumerationBit  TrailingWildCardinEnumeration  ExactMatch   Result
  227.  1                             0                              0           Browse Only
  228.  0                             1                              0           Find Only
  229.  0                             0                              1              Exact Match Only
  230.  1                             1                                 0           Browse/Find
  231.  0                               1                              1           Find/ExcatMatch
  232.  1                             1                              1           Browse/Find/ExactMatch
  233.  
  234. Implicit assumption in all these is, record type can be specified either as wild card or
  235. a type list.
  236.  
  237. The Following four bits will indicate sort ordering in enumeration.
  238. kSupportsOrderedEnumerationBit:
  239. If this bit is set, Enumerated records or in some order possibly in name order.
  240. kCanSupportNameOrderBit:
  241. If this is set, directory will support sortbyName option in Enumerate.
  242. kCanSupportTypeOrderBit:
  243. If this bit is set, directory will support sortbyType option in enumearte.
  244. kSupportSortBackwardsBit:
  245. If this bit is set, directory supports backward sorting.
  246.  
  247. kSupportsEnumerationContinueBit:
  248. If this bit is set, directory supports enumeration continue.
  249.  
  250. kSupportsLookupContinueBit:
  251. If this bit is set, directory supports lookup continue.
  252.  
  253. kSupportsEnumerateAttributeTypeContinueBit:
  254. If this bit is set, directory supports EnumerateAttributeType continue.
  255.  
  256. kSupportsEnumeratePseudonymContinueBit:
  257. If this bit is set, directory supports EnumeratePseudonym continue.
  258.  
  259. kSupportsAliasesBit:
  260. If this bit is set, directory supports create/delte/enumerate
  261. of Alias Records.
  262.  
  263. kSupportPseudonymBit:
  264. If this bit is set, directory supports create/delte/enumerate of
  265. pseudonyms for a record.
  266.  
  267. kSupportsPartialPathNameBit:
  268. If this bit is set, directory nodes can be specified using DNodeNumber of a
  269. intermediate DNode and a partial name starting from that DNode to the intended
  270. DNode.
  271.  
  272. kSupportsAuthenticationBit:
  273. If this bit is set, directory supports authentication manager calls.
  274.  
  275. kSupportsProxiesBit:
  276. If this bit is set, directory supports proxy related calls in authentication manager.
  277.  
  278. kSupportsFindRecordBit:
  279. If this bit is set, catalog supports find record call.
  280.  
  281. Bits and corresponding masks are as defined below.
  282. }
  283.  
  284. kSupportsDNodeNumberBit                        = 0;
  285. kSupportsRecordCreationIDBit                = 1;
  286. kSupportsAttributeCreationIDBit                = 2;
  287. kSupportsMatchAllBit                        = 3;
  288. kSupportsBeginsWithBit                        = 4;
  289. kSupportsExactMatchBit                        = 5;
  290. kSupportsEndsWithBit                        = 6;
  291. kSupportsContainsBit                        = 7;
  292. kSupportsOrderedEnumerationBit                = 8;
  293. kCanSupportNameOrderBit                        = 9;
  294. kCanSupportTypeOrderBit                        = 10;
  295. kSupportSortBackwardsBit                    = 11;
  296. kSupportIndexRatioBit                        = 12;    
  297. kSupportsEnumerationContinueBit                = 13;
  298. kSupportsLookupContinueBit                    = 14;
  299. kSupportsEnumerateAttributeTypeContinueBit    = 15;
  300. kSupportsEnumeratePseudonymContinueBit        = 16;
  301. kSupportsAliasesBit                            = 17;
  302. kSupportsPseudonymsBit                        = 18;
  303. kSupportsPartialPathNamesBit                = 19;
  304. kSupportsAuthenticationBit                    = 20;
  305. kSupportsProxiesBit                            = 21;
  306. kSupportsFindRecordBit                        = 22;
  307.  
  308.  
  309.  
  310. { values of DirGestalt }
  311. kSupportsDNodeNumberMask                        = $00000001;    {1<<kSupportsDNodeNumberBit}
  312. kSupportsRecordCreationIDMask                    = $00000002;    {1<<kSupportsRecordCreationIDBit}
  313. kSupportsAttributeCreationIDMask                  = $00000004;    {1<<kSupportsAttributeCreationIDBit}
  314. kSupportsMatchAllMask                               = $00000008;    {1<<kSupportsMatchAllBit}
  315. kSupportsBeginsWithMask                             = $00000010;    {1<<kSupportsBeginsWithBit}
  316. kSupportsExactMatchMask                               = $00000020;    {1<<kSupportsExactMatchBit}
  317. kSupportsEndsWithMask                            = $00000040;    {1<<kSupportsEndsWithBit}
  318. kSupportsContainsMask                            = $00000080;    {1<<kSupportsContainsBit}
  319. kSupportsOrderedEnumerationMask                    = $00000100;    {1<<kSupportsOrderedEnumerationBit}
  320. kCanSupportNameOrderMask                        = $00000200;    {1<<kCanSupportNameOrderBit}
  321. kCanSupportTypeOrderMask                        = $00000400;    {1<<kCanSupportTypeOrderBit}
  322. kSupportSortBackwardsMask                        = $00000800;    {1<<kSupportSortBackwardsBit}
  323. kSupportIndexRatioMask                            = $00001000;    {1<<kSupportIndexRatioBit}
  324. kSupportsEnumerationContinueMask                = $00002000;    {1<<kSupportsEnumerationContinueBit}
  325. kSupportsLookupContinueMask                        = $00004000;    {1<<kSupportsLookupContinueBit}
  326. kSupportsEnumerateAttributeTypeContinueMask        = $00008000;    {1<<kSupportsEnumerateAttributeTypeContinueBit}
  327. kSupportsEnumeratePseudonymContinueMask            = $00010000;    {1<<kSupportsEnumeratePseudonymContinueBit}
  328. kSupportsAliasesMask                               = $00020000;    {1<<kSupportsAliasesBit}
  329. kSupportsPseudonymsMask                            = $00040000;    {1<<kSupportsPseudonymsBit}
  330. kSupportsPartialPathNamesMask                    = $00080000;    {1<<kSupportsPartialPathNamesBit}
  331. kSupportsAuthenticationMask                        = $00100000;    {1<<kSupportsAuthenticationBit}
  332. kSupportsProxiesMask                            = $00200000;    {1<<kSupportsProxiesBit}
  333. kSupportsFindRecordMask                            = $00400000;    {1<<kSupportsFindRecordBit}
  334.  
  335.  
  336.  
  337. { Values of AuthLocalIdentityOp }
  338.  
  339. kAuthLockLocalIdentityOp        = 1;
  340. kAuthUnlockLocalIdentityOp        = 2;
  341. kAuthLocalIdentityNameChangeOp    = 3;
  342.  
  343.  
  344.  
  345. { Values of AuthLocalIdentityLockAction }
  346. kAuthLockPending            = 1;
  347. kAuthLockWillBeDone            = 2;
  348.  
  349.  
  350.  
  351.  
  352. { Values of AuthNotifications }
  353. kNotifyLockBit            = 0;
  354. kNotifyUnlockBit        = 1;
  355. kNotifyNameChangeBit    = 2;
  356. kNotifyLockMask            = $00000001;  {1<<kNotifyLockBit}
  357. kNotifyUnlockMask        = $00000002;  {1<<kNotifyUnlockBit}
  358. kNotifyNameChangeMask    = $00000004;  {1<<kNotifyNameChangeBit}
  359.  
  360.  
  361.  
  362. kPersonalDirectoryFileCreator    = 'kl03';
  363. kPersonalDirectoryFileType        = 'pabt';
  364. kBusinessCardFileType            = 'bust';
  365. kDirectoryFileType                = 'dirt';
  366. kDNodeFileType                    = 'dnod';
  367. kDirsRootFileType                = 'drtt';
  368. kRecordFileType                    = 'rcrd';
  369.  
  370.  
  371. TYPE
  372. DirSortOption = INTEGER;
  373.  
  374. DirSortDirection = INTEGER;
  375.  
  376. CategoryMask = LONGINT;
  377.  
  378. AccessMask = LONGINT;
  379.  
  380. DirGestalt = LONGINT;
  381.  
  382. AuthLocalIdentityOp = LONGINT;
  383.  
  384. AuthLocalIdentityLockAction = LONGINT;
  385.  
  386. AuthNotifications = LONGINT;
  387.  
  388. DNodeID = RECORD
  389.     dNodeNumber: DNodeNum;                { dNodenumber  }
  390.     reserved1: LONGINT;
  391.     name: RStringPtr;
  392.     reserved2: LONGINT;
  393.     END;
  394.  
  395. DirEnumSpec = RECORD
  396.     enumFlag: DirEnumChoices;
  397.     indexRatio: INTEGER;    { Approx Record Position between 1 and 100 If supported, 0 If not supported }
  398.     CASE INTEGER OF
  399.         1: (recordIdentifier: LocalRecordID);
  400.         2: (dNodeIdentifier: DNodeID);
  401.     END;
  402.  
  403. DirMetaInfo = RECORD
  404.     info: ARRAY[1..4] OF LONGINT;
  405.     END;
  406.  
  407. SLRV = RECORD
  408.     script: ScriptCode;            { Script code in which entries are sorted }
  409.     language: INTEGER;            { Language code in which entries are sorted }
  410.     regionCode: INTEGER;        { Region code in which entries are sorted }
  411.     version: INTEGER;            { version of oce sorting software }
  412.     END;
  413.  
  414. { Directory types and operations }
  415.  
  416. AuthIdentity = LONGINT;                    { unique identifier for an identity }
  417. LocalIdentity = AuthIdentity;            { Umbrella LocalIdentity }
  418.  
  419.  
  420. DESKey = RECORD                            { A DES key is 8 bytes of data }
  421.     a: LONGINT;
  422.     b: LONGINT;
  423.     END;
  424.  
  425.  
  426.  
  427. RC4Key = PACKED ARRAY[1..kRC4KeySizeInBytes] OF Byte;
  428.  
  429. AuthKeyType = LONGINT;
  430.  
  431. AuthKey = RECORD                            { key type followed by its data }
  432.     keyType: AuthKeyType;
  433.     CASE INTEGER OF
  434.         1: (des: DESKey);
  435.         2: (rc4: RC4Key);
  436.     END;
  437.     
  438. AuthKeyPtr = ^AuthKey;
  439.  
  440.  
  441.  
  442. {
  443. This header is common to all the parameter blocks.  Clients should not directly
  444. touch any of these fields except ioCompletion.  ioCompletion is the
  445. completion routine pointer for async calls; it is ignored for sync calls.
  446. ioResult is the result code from the call.
  447. }
  448.  
  449. AuthDirParamHeader = RECORD
  450.     qLink: Ptr;
  451.     reserved1: LONGINT;
  452.     reserved2: LONGINT;
  453.     ioCompletion: ProcPtr;
  454.     ioResult: OSErr;
  455.     saveA5: LONGINT;
  456.     reqCode: INTEGER;
  457.     reserved: ARRAY[1..2] OF LONGINT;
  458.     serverHint: AddrBlock;
  459.     dsRefNum: INTEGER;
  460.     callID: LONGINT;
  461.     identity: AuthIdentity;
  462.     gReserved1: LONGINT;
  463.     gReserved2: LONGINT;
  464.     gReserved3: LONGINT;
  465.     clientData: LONGINT;
  466.     END;
  467.     
  468. {****************************************************************************
  469.  
  470.         Authentication Manager operations
  471.  
  472. ****************************************************************************}
  473. {
  474. kAuthResolveCreationID:
  475. userRecord will contain the user information whose creationID has to be
  476. returned. A client must make this call when he does not know the creaitionID.
  477. The creationID must be set to nil before making the call. The server will attempt
  478. to match the recordid's in the data base which match the user name and
  479. type in the record.  Depending on number of matchings, following
  480. results will be returned.
  481. Exactly One Match : CreationID in RecordID and also in buffer (if buffer is given)
  482. totalMatches = actualMatches = 1.
  483. > 1 Match:
  484.     Buffer is Large Enough:
  485.     totalMatches = actualMatches
  486.     Buffer will contain all the CIDs, kOCEAmbiguousMatches error.
  487. > 1 Match:
  488.     Buffer is not Large Enough:
  489.     totalMatches > actualMatches
  490.     Buffer will contain all the CIDs (equal to actualMatches), daMoreDataError error.
  491. 0 Matches:
  492.  kOCENoSuchRecord error
  493. }
  494.  
  495. AuthResolveCreationIDPB = RECORD
  496.     qLink: Ptr;
  497.     reserved1: LONGINT;
  498.     reserved2: LONGINT;
  499.     ioCompletion: ProcPtr;
  500.     ioResult: OSErr;
  501.     saveA5: LONGINT;
  502.     reqCode: INTEGER;
  503.     reserved: ARRAY[1..2] OF LONGINT;
  504.     serverHint: AddrBlock;
  505.     dsRefNum: INTEGER;
  506.     callID: LONGINT;
  507.     identity: AuthIdentity;
  508.     gReserved1: LONGINT;
  509.     gReserved2: LONGINT;
  510.     gReserved3: LONGINT;
  511.     clientData: LONGINT;
  512.     
  513.     userRecord: RecordIDPtr;            {  --> OCE name(Record) of the user }
  514.     bufferLength: LONGINT;                {  --> Buffer Size to hold duplicate Info }
  515.     buffer: Ptr;                        {  --> Buffer  to hold duplicate Info }
  516.     totalMatches: LONGINT;                { <--  Total Number of matching names found }
  517.     actualMatches: LONGINT;                { <--  Number of matches returned in the buffer }
  518.     END;
  519.  
  520.  
  521. {
  522. kAuthBindSpecificIdentity:
  523. userRecord will contain the user information whose identity has to be
  524. verified. userKey will contain the userKey. An Identity is returned which
  525. binds the key and the userRecord. The identity returned can be used in the 'identity'
  526. field in the header portion (AuthDirParamHeader) for authenticating the Directory and
  527. Authentication manager calls.
  528. }
  529.  
  530. AuthBindSpecificIdentityPB = RECORD
  531.     qLink: Ptr;
  532.     reserved1: LONGINT;
  533.     reserved2: LONGINT;
  534.     ioCompletion: ProcPtr;
  535.     ioResult: OSErr;
  536.     saveA5: LONGINT;
  537.     reqCode: INTEGER;
  538.     reserved: ARRAY[1..2] OF LONGINT;
  539.     serverHint: AddrBlock;
  540.     dsRefNum: INTEGER;
  541.     callID: LONGINT;
  542.     identity: AuthIdentity;
  543.     gReserved1: LONGINT;
  544.     gReserved2: LONGINT;
  545.     gReserved3: LONGINT;
  546.     clientData: LONGINT;
  547.     
  548.     userIdentity: AuthIdentity;            { <--  binding identity }
  549.     userRecord: RecordIDPtr;            {  --> OCE name(Record) of the user }
  550.     userKey: AuthKeyPtr;                {  --> OCE Key for the user }
  551.     END;
  552.  
  553.  
  554. {
  555. kAuthUnbindSpecificIdentity:
  556. This call will unbind the userRecord and key which were bind earlier.
  557. }
  558.  
  559. AuthUnbindSpecificIdentityPB = RECORD
  560.     qLink: Ptr;
  561.     reserved1: LONGINT;
  562.     reserved2: LONGINT;
  563.     ioCompletion: ProcPtr;
  564.     ioResult: OSErr;
  565.     saveA5: LONGINT;
  566.     reqCode: INTEGER;
  567.     reserved: ARRAY[1..2] OF LONGINT;
  568.     serverHint: AddrBlock;
  569.     dsRefNum: INTEGER;
  570.     callID: LONGINT;
  571.     identity: AuthIdentity;
  572.     gReserved1: LONGINT;
  573.     gReserved2: LONGINT;
  574.     gReserved3: LONGINT;
  575.     clientData: LONGINT;
  576.     
  577.     userIdentity: AuthIdentity;            {  --> identity to be deleted }
  578.     END;
  579.  
  580.  
  581.  
  582. {
  583. kAuthGetSpecificIdentityInfo:
  584. This call will return the userRecord for the given identity. Note: key is not
  585. returned because this would compromise security.
  586. }
  587.  
  588. AuthGetSpecificIdentityInfoPB = RECORD
  589.     qLink: Ptr;
  590.     reserved1: LONGINT;
  591.     reserved2: LONGINT;
  592.     ioCompletion: ProcPtr;
  593.     ioResult: OSErr;
  594.     saveA5: LONGINT;
  595.     reqCode: INTEGER;
  596.     reserved: ARRAY[1..2] OF LONGINT;
  597.     serverHint: AddrBlock;
  598.     dsRefNum: INTEGER;
  599.     callID: LONGINT;
  600.     identity: AuthIdentity;
  601.     gReserved1: LONGINT;
  602.     gReserved2: LONGINT;
  603.     gReserved3: LONGINT;
  604.     clientData: LONGINT;
  605.     
  606.     userIdentity: AuthIdentity;            {  --> identity of initiator }
  607.     userRecord: RecordIDPtr;            { <--  OCE name(Record) of the user }
  608.     END;
  609.  
  610.  
  611.  
  612. {
  613. kAuthAddKey:
  614. userRecord will contain the user information whose identity has to be
  615. created. userKey will point to the key to be created. password points to
  616. an RString containing the password used to generate the key.
  617. }
  618.  
  619. AuthAddKeyPB = RECORD
  620.     qLink: Ptr;
  621.     reserved1: LONGINT;
  622.     reserved2: LONGINT;
  623.     ioCompletion: ProcPtr;
  624.     ioResult: OSErr;
  625.     saveA5: LONGINT;
  626.     reqCode: INTEGER;
  627.     reserved: ARRAY[1..2] OF LONGINT;
  628.     serverHint: AddrBlock;
  629.     dsRefNum: INTEGER;
  630.     callID: LONGINT;
  631.     identity: AuthIdentity;
  632.     gReserved1: LONGINT;
  633.     gReserved2: LONGINT;
  634.     gReserved3: LONGINT;
  635.     clientData: LONGINT;
  636.     
  637.     userRecord: RecordIDPtr;            {  --> OCE name(Record) of the user }
  638.     userKey: AuthKeyPtr;                { <--  OCE Key for the user }
  639.     password: RStringPtr;                {  --> Pointer to password STRING }
  640.     END;
  641.  
  642.  
  643. {
  644. kAuthChangeKey:
  645. userRecord will contain the user information whose identity has to be
  646. created. userKey will point to the key to be created. password points to
  647. an RString containing the password used to generate the key.
  648. }
  649.  
  650. AuthChangeKeyPB = RECORD
  651.     qLink: Ptr;
  652.     reserved1: LONGINT;
  653.     reserved2: LONGINT;
  654.     ioCompletion: ProcPtr;
  655.     ioResult: OSErr;
  656.     saveA5: LONGINT;
  657.     reqCode: INTEGER;
  658.     reserved: ARRAY[1..2] OF LONGINT;
  659.     serverHint: AddrBlock;
  660.     dsRefNum: INTEGER;
  661.     callID: LONGINT;
  662.     identity: AuthIdentity;
  663.     gReserved1: LONGINT;
  664.     gReserved2: LONGINT;
  665.     gReserved3: LONGINT;
  666.     clientData: LONGINT;
  667.     
  668.     userRecord: RecordIDPtr;            {  --> OCE name(Record) of the user }
  669.     userKey: AuthKeyPtr;                { <--  New OCE Key for the user }
  670.     password: RStringPtr;                {  -->Pointer to the new password STRING }
  671.     END;
  672.  
  673.  
  674. {
  675. AuthDeleteKey:
  676. userRecord will contain the user information whose Key has to be deleted.
  677. }
  678.  
  679. AuthDeleteKeyPB = RECORD
  680.     qLink: Ptr;
  681.     reserved1: LONGINT;
  682.     reserved2: LONGINT;
  683.     ioCompletion: ProcPtr;
  684.     ioResult: OSErr;
  685.     saveA5: LONGINT;
  686.     reqCode: INTEGER;
  687.     reserved: ARRAY[1..2] OF LONGINT;
  688.     serverHint: AddrBlock;
  689.     dsRefNum: INTEGER;
  690.     callID: LONGINT;
  691.     identity: AuthIdentity;
  692.     gReserved1: LONGINT;
  693.     gReserved2: LONGINT;
  694.     gReserved3: LONGINT;
  695.     clientData: LONGINT;
  696.     
  697.     userRecord: RecordIDPtr;            {  --> OCE name(Record) of the user }
  698.     END;
  699.  
  700.  
  701. { AuthPasswordToKey: Converts an RString into a key. }
  702.  
  703. AuthPasswordToKeyPB = RECORD
  704.     qLink: Ptr;
  705.     reserved1: LONGINT;
  706.     reserved2: LONGINT;
  707.     ioCompletion: ProcPtr;
  708.     ioResult: OSErr;
  709.     saveA5: LONGINT;
  710.     reqCode: INTEGER;
  711.     reserved: ARRAY[1..2] OF LONGINT;
  712.     serverHint: AddrBlock;
  713.     dsRefNum: INTEGER;
  714.     callID: LONGINT;
  715.     identity: AuthIdentity;
  716.     gReserved1: LONGINT;
  717.     gReserved2: LONGINT;
  718.     gReserved3: LONGINT;
  719.     clientData: LONGINT;
  720.     
  721.     userRecord: RecordIDPtr;            {  --> OCE name(Record) of the user }
  722.     key: AuthKeyPtr;                    { <--  }
  723.     password: RStringPtr;                {  -->Pointer to the new password STRING }
  724.     END;
  725.  
  726.  
  727. {
  728. kAuthGetCredentials:
  729. userRecord will contain the user information whose identity has to be
  730. kMailDeletedMask. keyType (e.g. asDESKey) will indicate what type of key has to
  731. be deleted.
  732. }
  733.  
  734. AuthGetCredentialsPB = RECORD
  735.     qLink: Ptr;
  736.     reserved1: LONGINT;
  737.     reserved2: LONGINT;
  738.     ioCompletion: ProcPtr;
  739.     ioResult: OSErr;
  740.     saveA5: LONGINT;
  741.     reqCode: INTEGER;
  742.     reserved: ARRAY[1..2] OF LONGINT;
  743.     serverHint: AddrBlock;
  744.     dsRefNum: INTEGER;
  745.     callID: LONGINT;
  746.     identity: AuthIdentity;
  747.     gReserved1: LONGINT;
  748.     gReserved2: LONGINT;
  749.     gReserved3: LONGINT;
  750.     clientData: LONGINT;
  751.     
  752.     userIdentity: AuthIdentity;            {  --> identity of initiator }
  753.     recipient: RecordIDPtr;                {  --> OCE name of recipient }
  754.     sessionKey: AuthKeyPtr;                { <--  session key }
  755.     expiry: UTCTime;                    { <--> desired/actual expiry }
  756.     credentialsLength: LONGINT;            { <--> max/actual credentials size }
  757.     credentials: Ptr;                    { <--  buffer where credentials are returned }
  758.     END;
  759.  
  760.  
  761. {
  762. AuthDecryptCredentialsPB:
  763. Changes:
  764. userKey is changed userIdentity.
  765. userRecord is changed to initiatorRecord. User must supply buffer
  766. to hold initiatorRecord.
  767. agentList has changed to agent. There wil be no call back.
  768. User must supply buffer to hold agent Record.
  769. An additional BOOLEAN parameter 'hasAgent' is included.
  770. Toolbox will set this if an 'Agent' record is found in the
  771. credentials. If RecordIDPtr is 'nil', no agent record will
  772. be copied. However user can examine 'hasAgent', If true user
  773. can reissue this call with apprpriate buffer for getting a recordID.
  774. agent has changed to intermediary.  User must supply buffer to hold
  775. intermediary Record.  The toolbox will set 'hasIntermediary' if an
  776. 'intermediary' record is found in the credentials.
  777. }
  778.  
  779. AuthDecryptCredentialsPB = RECORD
  780.     qLink: Ptr;
  781.     reserved1: LONGINT;
  782.     reserved2: LONGINT;
  783.     ioCompletion: ProcPtr;
  784.     ioResult: OSErr;
  785.     saveA5: LONGINT;
  786.     reqCode: INTEGER;
  787.     reserved: ARRAY[1..2] OF LONGINT;
  788.     serverHint: AddrBlock;
  789.     dsRefNum: INTEGER;
  790.     callID: LONGINT;
  791.     identity: AuthIdentity;
  792.     gReserved1: LONGINT;
  793.     gReserved2: LONGINT;
  794.     gReserved3: LONGINT;
  795.     clientData: LONGINT;
  796.     
  797.     userIdentity: AuthIdentity;            {  --> user's Identity }
  798.     initiatorRecord: RecordIDPtr;        { <--  OCE name of the initiator }
  799.     sessionKey: AuthKeyPtr;                { <--  session key }
  800.     expiry: UTCTime;                    { <--  credentials expiry time }
  801.     credentialsLength: LONGINT;            {  --> actual credentials size }
  802.     credentials: Ptr;                    {  --> credentials to be decrypted }
  803.     issueTime: UTCTime;                    { <--  credentials expiry time }
  804.     hasIntermediary: BOOLEAN;            { <--  if true, An intermediary Record was found in credentials }
  805.     intermediary: RecordIDPtr;            { <--  recordID of the intermediary }
  806.     END;
  807.  
  808.  
  809.  
  810. AuthMakeChallengePB = RECORD
  811.     qLink: Ptr;
  812.     reserved1: LONGINT;
  813.     reserved2: LONGINT;
  814.     ioCompletion: ProcPtr;
  815.     ioResult: OSErr;
  816.     saveA5: LONGINT;
  817.     reqCode: INTEGER;
  818.     reserved: ARRAY[1..2] OF LONGINT;
  819.     serverHint: AddrBlock;
  820.     dsRefNum: INTEGER;
  821.     callID: LONGINT;
  822.     identity: AuthIdentity;
  823.     gReserved1: LONGINT;
  824.     gReserved2: LONGINT;
  825.     gReserved3: LONGINT;
  826.     clientData: LONGINT;
  827.     
  828.     key: AuthKeyPtr;                    {  --> UnEncrypted SessionKey }
  829.     challenge: Ptr;                        { <--  Encrypted Challenge }
  830.     challengeBufferLength: LONGINT;        {  ->length of challenge buffer }
  831.     challengeLength: LONGINT;            {  <-length of Encrypted Challenge }
  832.     END;
  833.  
  834.  
  835. AuthMakeReplyPB = RECORD
  836.     qLink: Ptr;
  837.     reserved1: LONGINT;
  838.     reserved2: LONGINT;
  839.     ioCompletion: ProcPtr;
  840.     ioResult: OSErr;
  841.     saveA5: LONGINT;
  842.     reqCode: INTEGER;
  843.     reserved: ARRAY[1..2] OF LONGINT;
  844.     serverHint: AddrBlock;
  845.     dsRefNum: INTEGER;
  846.     callID: LONGINT;
  847.     identity: AuthIdentity;
  848.     gReserved1: LONGINT;
  849.     gReserved2: LONGINT;
  850.     gReserved3: LONGINT;
  851.     clientData: LONGINT;
  852.     
  853.     key: AuthKeyPtr;                    {  --> UnEncrypted SessionKey }
  854.     challenge: Ptr;                        {  --> Encrypted Challenge }
  855.     reply: Ptr;                            { <--  Encrypted Reply }
  856.     replyBufferLength: LONGINT;            {  -->length of challenge buffer }
  857.     challengeLength: LONGINT;            {  --> length of Encrypted Challenge }
  858.     replyLength: LONGINT;                { <--  length of Encrypted Reply }
  859.     END;
  860.  
  861.  
  862. AuthVerifyReplyPB = RECORD
  863.     qLink: Ptr;
  864.     reserved1: LONGINT;
  865.     reserved2: LONGINT;
  866.     ioCompletion: ProcPtr;
  867.     ioResult: OSErr;
  868.     saveA5: LONGINT;
  869.     reqCode: INTEGER;
  870.     reserved: ARRAY[1..2] OF LONGINT;
  871.     serverHint: AddrBlock;
  872.     dsRefNum: INTEGER;
  873.     callID: LONGINT;
  874.     identity: AuthIdentity;
  875.     gReserved1: LONGINT;
  876.     gReserved2: LONGINT;
  877.     gReserved3: LONGINT;
  878.     clientData: LONGINT;
  879.     
  880.     key: AuthKeyPtr;                    {  --> UnEncrypted SessionKey }
  881.     challenge: Ptr;                        {  --> Encrypted Challenge }
  882.     reply: Ptr;                            {  --> Encrypted Reply }
  883.     challengeLength: LONGINT;            {  --> length of Encrypted Challenge }
  884.     replyLength: LONGINT;                {  --> length of Encrypted Reply }
  885.     END;
  886.  
  887.  
  888.  
  889.  
  890. {
  891. kAuthGetUTCTime:
  892. RLI will contain a valid RLI for a cluster server.
  893. UTC(GMT) time from one of the cluster server will be returned.
  894. An 'offSet' from UTC(GMT) to Mac Local Time will also be returned.
  895. If RLI is nil Map DA is used to determine UTC(GMT).
  896. Mac Local Time = theUTCTime + theUTCOffset.
  897. }
  898.  
  899. AuthGetUTCTimePB = RECORD
  900.     qLink: Ptr;
  901.     reserved1: LONGINT;
  902.     reserved2: LONGINT;
  903.     ioCompletion: ProcPtr;
  904.     ioResult: OSErr;
  905.     saveA5: LONGINT;
  906.     reqCode: INTEGER;
  907.     reserved: ARRAY[1..2] OF LONGINT;
  908.     serverHint: AddrBlock;
  909.     dsRefNum: INTEGER;
  910.     callID: LONGINT;
  911.     identity: AuthIdentity;
  912.     gReserved1: LONGINT;
  913.     gReserved2: LONGINT;
  914.     gReserved3: LONGINT;
  915.     clientData: LONGINT;
  916.     
  917.     pRLI: PackedRLIPtr;                    {  --> packed RLI of the Node, whose server's UTC is requested }
  918.     theUTCTime: UTCTime;                { <--  current UTC(GMT) Time utc seconds since 1/1/1904 }
  919.     theUTCOffset: UTCOffset;            { <--  offset from UTC(GMT) seconds EAST of Greenwich }
  920.     END;
  921.  
  922.  
  923.  
  924. {
  925. kAuthMakeProxy:
  926. A user represented bu the 'userIdentity' can make a proxy using this call.
  927. 'recipient' is the RecordID of the recipient whom user is requesting proxy.
  928. 'intermediary' is the RecordID of the intermediary holding proxy for the user.
  929. 'firstValid' is time at which proxy becomes valid.
  930. 'expiry' is the time at which proxy must expire.
  931. 'proxyLength' will have the length of the buffer pointed by 'proxy' as input.
  932. When the call completes, it will hold the actual length of proxy. If the
  933. call completes 'kOCEMoreData' error, client can reissue the call with the
  934. buffer size as 'proxyLength' returned.
  935. expiry is a suggestion, and may be adjusted to be earlier by the ADAP/OCE server.
  936. The 'proxy' obtained like this might be used by the 'intermediary' to obtain credentials
  937. for the server using TradeProxyForCredentials call.
  938. authDataLength and authData are intended for possible future work, but are
  939. ignored for now.
  940. }
  941.  
  942. AuthMakeProxyPB = RECORD
  943.     qLink: Ptr;
  944.     reserved1: LONGINT;
  945.     reserved2: LONGINT;
  946.     ioCompletion: ProcPtr;
  947.     ioResult: OSErr;
  948.     saveA5: LONGINT;
  949.     reqCode: INTEGER;
  950.     reserved: ARRAY[1..2] OF LONGINT;
  951.     serverHint: AddrBlock;
  952.     dsRefNum: INTEGER;
  953.     callID: LONGINT;
  954.     identity: AuthIdentity;
  955.     gReserved1: LONGINT;
  956.     gReserved2: LONGINT;
  957.     gReserved3: LONGINT;
  958.     clientData: LONGINT;
  959.     
  960.     userIdentity: AuthIdentity;            {  --> identity of principal }
  961.     recipient: RecordIDPtr;                {  --> OCE name of recipient }
  962.     firstValid: UTCTime;                {  --> time at which proxy becomes valid }
  963.     expiry: UTCTime;                    {  --> time at which proxy expires }
  964.     authDataLength: LONGINT;            {  --> size of authorization data }
  965.     authData: Ptr;                        {  --> pointer to authorization data }
  966.     proxyLength: LONGINT;                { <--> max/actual proxy size }
  967.     proxy: Ptr;                            { <--> buffer where proxy is returned }
  968.     intermediary: RecordIDPtr;            {  --> RecordID of intermediary }
  969.     END;
  970.  
  971.  
  972. {
  973. kAuthTradeProxyForCredentials:
  974. Using this call, intermediary holding a 'proxy' for a recipient may obtain credentials
  975. for that recipient. 'userIdentity' is the identity for the 'intermediary'.
  976. 'recipient' is the RecordID for whom credetials are requested.
  977. 'principal' is the RecordID of the user who created the proxy.
  978. 'proxyLength' is the length of data pointed by 'proxy.
  979. If the call is succesfull, credentials will be returned in the
  980. buffer pointed by 'credentials'. 'expiry' is the desired expiry time at input.
  981. When call succeds this will have expiry time of credentials.
  982. This is very similar to GetCredentials except that we (course: of) need the proxy,
  983. but we also need the name of the principal who created the proxy.
  984. }
  985.  
  986. AuthTradeProxyForCredentialsPB = RECORD
  987.     qLink: Ptr;
  988.     reserved1: LONGINT;
  989.     reserved2: LONGINT;
  990.     ioCompletion: ProcPtr;
  991.     ioResult: OSErr;
  992.     saveA5: LONGINT;
  993.     reqCode: INTEGER;
  994.     reserved: ARRAY[1..2] OF LONGINT;
  995.     serverHint: AddrBlock;
  996.     dsRefNum: INTEGER;
  997.     callID: LONGINT;
  998.     identity: AuthIdentity;
  999.     gReserved1: LONGINT;
  1000.     gReserved2: LONGINT;
  1001.     gReserved3: LONGINT;
  1002.     clientData: LONGINT;
  1003.     
  1004.     userIdentity: AuthIdentity;            {  --> identity of intermediary }
  1005.     recipient: RecordIDPtr;                {  --> OCE name of recipient }
  1006.     sessionKey: AuthKeyPtr;                { <--  session key }
  1007.     expiry: UTCTime;                    { <--> desired/actual expiry }
  1008.     credentialsLength: LONGINT;            { <--> max/actual credentials size }
  1009.     credentials: Ptr;                    { <--> buffer where credentials are returned }
  1010.     proxyLength: LONGINT;                {  --> actual proxy size }
  1011.     proxy: Ptr;                            {  --> buffer containing proxy }
  1012.     principal: RecordIDPtr;                {  --> RecordID of principal }
  1013.     END;
  1014.  
  1015.  
  1016. { API for Local Identity Interface }
  1017. {
  1018. AuthGetLocalIdentityPB:
  1019. A Collaborative application intended to work under the umbrella of LocalIdentity
  1020. for the OCE toolbox will have to make this call to obtain LocalIdentity.
  1021. If LocalIdentity has not been created, then application will get
  1022. 'daLocalIdentityNotExistsErr'. The calling application then guide the user to
  1023. Login by making SDPPromptForLocalIdentity call.
  1024. If the LocalIdentity has not been setup, then calling application will
  1025. receieve 'daOCESetupRequiredErr'. In this case application should put the dialog
  1026. recommended by the OCE Setup document and guide the user through OCE Setup.
  1027. If a backGround application or stand alone code requires LocalIdentity, if it gets the
  1028. OSErr from LocalIdentity and can not call SDPPromptForLocalIdentity, it should it self
  1029. register with the toolbox using kAuthAddToLocalIdentityQueue call. It will be notified
  1030. when a LocalIdentity gets created by a foreground application.
  1031. }
  1032.  
  1033. AuthGetLocalIdentityPB = RECORD
  1034.     qLink: Ptr;
  1035.     reserved1: LONGINT;
  1036.     reserved2: LONGINT;
  1037.     ioCompletion: ProcPtr;
  1038.     ioResult: OSErr;
  1039.     saveA5: LONGINT;
  1040.     reqCode: INTEGER;
  1041.     reserved: ARRAY[1..2] OF LONGINT;
  1042.     serverHint: AddrBlock;
  1043.     dsRefNum: INTEGER;
  1044.     callID: LONGINT;
  1045.     identity: AuthIdentity;
  1046.     gReserved1: LONGINT;
  1047.     gReserved2: LONGINT;
  1048.     gReserved3: LONGINT;
  1049.     clientData: LONGINT;
  1050.     
  1051.     theLocalIdentity: LocalIdentity;    { <--  LocalIdentity }
  1052.     END;
  1053.  
  1054.  
  1055. {
  1056. kAuthUnlockLocalIdentity:
  1057. The LocalIdentity can be created using this call.
  1058. The userName and password correspond to the LocalIdentity setup.
  1059. If the password matches, then collabIdentity will be returned.
  1060. Typically SDPPromptForLocalIdentity call will make this call.
  1061. All applications which are registered through kAuthAddToLocalIdentityQueue
  1062. will be notified.
  1063. }
  1064.  
  1065. AuthUnlockLocalIdentityPB = RECORD
  1066.     qLink: Ptr;
  1067.     reserved1: LONGINT;
  1068.     reserved2: LONGINT;
  1069.     ioCompletion: ProcPtr;
  1070.     ioResult: OSErr;
  1071.     saveA5: LONGINT;
  1072.     reqCode: INTEGER;
  1073.     reserved: ARRAY[1..2] OF LONGINT;
  1074.     serverHint: AddrBlock;
  1075.     dsRefNum: INTEGER;
  1076.     callID: LONGINT;
  1077.     identity: AuthIdentity;
  1078.     gReserved1: LONGINT;
  1079.     gReserved2: LONGINT;
  1080.     gReserved3: LONGINT;
  1081.     clientData: LONGINT;
  1082.     
  1083.     theLocalIdentity: LocalIdentity;    { <--  LocalIdentity }
  1084.     userName: RStringPtr;                {  --> userName }
  1085.     password: RStringPtr;                {  -->user password }
  1086.     END;
  1087.  
  1088.  
  1089. {
  1090. kAuthLockLocalIdentity:
  1091. With this call existing LocalIdentity can be locked. If the ASDeleteLocalIdetity
  1092. call fails with 'kOCEOperationDenied' error, name will contain the application which
  1093. denied the operation. This name will be supplied by the application
  1094. when it registered through kAuthAddToLocalIdentityQueue call
  1095. }
  1096.  
  1097. AuthLockLocalIdentityPB = RECORD
  1098.     qLink: Ptr;
  1099.     reserved1: LONGINT;
  1100.     reserved2: LONGINT;
  1101.     ioCompletion: ProcPtr;
  1102.     ioResult: OSErr;
  1103.     saveA5: LONGINT;
  1104.     reqCode: INTEGER;
  1105.     reserved: ARRAY[1..2] OF LONGINT;
  1106.     serverHint: AddrBlock;
  1107.     dsRefNum: INTEGER;
  1108.     callID: LONGINT;
  1109.     identity: AuthIdentity;
  1110.     gReserved1: LONGINT;
  1111.     gReserved2: LONGINT;
  1112.     gReserved3: LONGINT;
  1113.     clientData: LONGINT;
  1114.     
  1115.     theLocalIdentity: LocalIdentity;    {  --> LocalIdentity }
  1116.     name: StringPtr;                    { <--  name of the app which denied delete }
  1117.     END;
  1118.  
  1119.  
  1120.  
  1121. NotificationProc = ProcPtr;    
  1122.     { FUNCTION NotificationProc(clientData: LONGINT; callValue: AuthLocalIdentityOp;
  1123.         actionValue: AuthLocalIdentityLockAction; identity: LocalIdentity): BOOLEAN;}
  1124.  
  1125. {
  1126. kAuthAddToLocalIdentityQueue:
  1127. An application requiring notification of locking/unlocking of the
  1128. LocalIdentity can install itself using this call. The function provided
  1129. in 'notifyProc' will be called whenever the requested event happens.
  1130. When an AuthLockLocalIdentity call is made to the toolbox, the notificationProc
  1131. will be called with 'kAuthLockPending'. The application may refuse the lock by returning
  1132. a 'true' value. If all the registered entries return 'false' value, locking will be done
  1133. successfully. Otherwise 'kOCEOperationDenied' error is returned to the caller. The appName
  1134. (registered with the notificationProc) of the application which denied locking is also
  1135. returned to the caller making the AuthLockIdentity call.
  1136. }
  1137.  
  1138. AuthAddToLocalIdentityQueuePB = RECORD
  1139.     qLink: Ptr;
  1140.     reserved1: LONGINT;
  1141.     reserved2: LONGINT;
  1142.     ioCompletion: ProcPtr;
  1143.     ioResult: OSErr;
  1144.     saveA5: LONGINT;
  1145.     reqCode: INTEGER;
  1146.     reserved: ARRAY[1..2] OF LONGINT;
  1147.     serverHint: AddrBlock;
  1148.     dsRefNum: INTEGER;
  1149.     callID: LONGINT;
  1150.     identity: AuthIdentity;
  1151.     gReserved1: LONGINT;
  1152.     gReserved2: LONGINT;
  1153.     gReserved3: LONGINT;
  1154.     clientData: LONGINT;
  1155.     
  1156.     notifyProc: NotificationProc;    {  --> notification procedure }
  1157.     notifyFlags: AuthNotifications;            {  --> notifyFlags }
  1158.     appName: StringPtr;                        {  --> name of application to be returned in Delete/Stop }
  1159.     END;
  1160.  
  1161.  
  1162. {
  1163. kAuthRemoveFromLocalIdentityQueue:}
  1164.  
  1165. AuthRemoveFromLocalIdentityQueuePB = RECORD
  1166.     qLink: Ptr;
  1167.     reserved1: LONGINT;
  1168.     reserved2: LONGINT;
  1169.     ioCompletion: ProcPtr;
  1170.     ioResult: OSErr;
  1171.     saveA5: LONGINT;
  1172.     reqCode: INTEGER;
  1173.     reserved: ARRAY[1..2] OF LONGINT;
  1174.     serverHint: AddrBlock;
  1175.     dsRefNum: INTEGER;
  1176.     callID: LONGINT;
  1177.     identity: AuthIdentity;
  1178.     gReserved1: LONGINT;
  1179.     gReserved2: LONGINT;
  1180.     gReserved3: LONGINT;
  1181.     clientData: LONGINT;
  1182.     
  1183.     nofityProc: NotificationProc;    {  --> notification procedure }
  1184.     END;
  1185.  
  1186.  
  1187. {
  1188. kAuthSetupLocalIdentity:
  1189. The LocalIdentity can be Setup using this call.
  1190. The userName and password correspond to the LocalIdentity setup.
  1191. If a LocalIdentity Setup already exists 'kOCELocalIdentitySetupExists' error
  1192. will be returned.
  1193. }
  1194.  
  1195. AuthSetupLocalIdentityPB = RECORD
  1196.     qLink: Ptr;
  1197.     reserved1: LONGINT;
  1198.     reserved2: LONGINT;
  1199.     ioCompletion: ProcPtr;
  1200.     ioResult: OSErr;
  1201.     saveA5: LONGINT;
  1202.     reqCode: INTEGER;
  1203.     reserved: ARRAY[1..2] OF LONGINT;
  1204.     serverHint: AddrBlock;
  1205.     dsRefNum: INTEGER;
  1206.     callID: LONGINT;
  1207.     identity: AuthIdentity;
  1208.     gReserved1: LONGINT;
  1209.     gReserved2: LONGINT;
  1210.     gReserved3: LONGINT;
  1211.     clientData: LONGINT;
  1212.     
  1213.     aReserved: LONGINT;                    {  --  }
  1214.     userName: RStringPtr;                {  --> userName }
  1215.     password: RStringPtr;                {  -->user password }
  1216.     END;
  1217.  
  1218.  
  1219. {
  1220. kAuthChangeLocalIdentity:
  1221. An existing LocalIdentity  Setup can be changed using this call.
  1222. The userName and password correspond to the LocalIdentity setup.
  1223. If a LocalIdentity Setup does not exists 'kOCELocalIdentityNotSetup' error
  1224. will be returned. The user can use  kAuthSetupLocalIdentity call to setit up.
  1225. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1226. OSErr will be returned. If successful, LocalID will have new name as 'userName' and
  1227. password as 'newPassword'.
  1228. }
  1229.  
  1230. AuthChangeLocalIdentityPB = RECORD
  1231.     qLink: Ptr;
  1232.     reserved1: LONGINT;
  1233.     reserved2: LONGINT;
  1234.     ioCompletion: ProcPtr;
  1235.     ioResult: OSErr;
  1236.     saveA5: LONGINT;
  1237.     reqCode: INTEGER;
  1238.     reserved: ARRAY[1..2] OF LONGINT;
  1239.     serverHint: AddrBlock;
  1240.     dsRefNum: INTEGER;
  1241.     callID: LONGINT;
  1242.     identity: AuthIdentity;
  1243.     gReserved1: LONGINT;
  1244.     gReserved2: LONGINT;
  1245.     gReserved3: LONGINT;
  1246.     clientData: LONGINT;
  1247.     
  1248.     aReserved: LONGINT;                    {  --  }
  1249.     userName: RStringPtr;                {  --> userName }
  1250.     password: RStringPtr;                {  --> current password }
  1251.     newPassword: RStringPtr;            {  --> new password }
  1252.     END;
  1253.  
  1254.  
  1255. {
  1256. kAuthRemoveLocalIdentity:
  1257. An existing LocalIdentity  Setup can be removed using this call.
  1258. The userName and password correspond to the LocalIdentity setup.
  1259. If a LocalIdentity Setup does not exists 'kOCELocalIdentityNotSetup' error
  1260. will be returned.
  1261. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1262. OSErr will be returned. If successful, LocalIdentity will be removed from the OCE Setup.
  1263. This is a very distructive operation, user must be warned enough before actually making
  1264. this call.
  1265. }
  1266.  
  1267. AuthRemoveLocalIdentityPB = RECORD
  1268.     qLink: Ptr;
  1269.     reserved1: LONGINT;
  1270.     reserved2: LONGINT;
  1271.     ioCompletion: ProcPtr;
  1272.     ioResult: OSErr;
  1273.     saveA5: LONGINT;
  1274.     reqCode: INTEGER;
  1275.     reserved: ARRAY[1..2] OF LONGINT;
  1276.     serverHint: AddrBlock;
  1277.     dsRefNum: INTEGER;
  1278.     callID: LONGINT;
  1279.     identity: AuthIdentity;
  1280.     gReserved1: LONGINT;
  1281.     gReserved2: LONGINT;
  1282.     gReserved3: LONGINT;
  1283.     clientData: LONGINT;
  1284.     
  1285.     aReserved: LONGINT;                    {  --  }
  1286.     userName: RStringPtr;                {  --> userName }
  1287.     password: RStringPtr;                {  --> current password }
  1288.     END;
  1289.  
  1290.  
  1291. {
  1292. kOCESetupAddDirectoryInfo:
  1293. Using this call identity for a directory can be setup under LocalIdentity umbrella.
  1294. ASCreateLocalIdentity should have been done succesfully before making this call.
  1295. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1296. DirAddDSAMDirectory call was made.
  1297. rid-> is the recordID in which the identity for the directory will be established.
  1298. password-> the password associated with the rid in the directory world.
  1299. }
  1300.  
  1301. OCESetupAddDirectoryInfoPB = RECORD
  1302.     qLink: Ptr;
  1303.     reserved1: LONGINT;
  1304.     reserved2: LONGINT;
  1305.     ioCompletion: ProcPtr;
  1306.     ioResult: OSErr;
  1307.     saveA5: LONGINT;
  1308.     reqCode: INTEGER;
  1309.     reserved: ARRAY[1..2] OF LONGINT;
  1310.     serverHint: AddrBlock;
  1311.     dsRefNum: INTEGER;
  1312.     callID: LONGINT;
  1313.     identity: AuthIdentity;
  1314.     gReserved1: LONGINT;
  1315.     gReserved2: LONGINT;
  1316.     gReserved3: LONGINT;
  1317.     clientData: LONGINT;
  1318.     
  1319.     directoryRecordCID: CreationID;        {  --> CreationID for the directory }
  1320.     recordID: RecordIDPtr;                {  --> recordID for the identity }
  1321.     password: RStringPtr;                {  --> password in the directory world }
  1322.     END;
  1323.  
  1324.  
  1325. {
  1326. kOCESetupChangeDirectoryInfo:
  1327. Using this call an existing identity for a directory under LocalIdentity umbrella
  1328. can be changed.
  1329. ASCreateLocalIdentity should have been done succesfully before making this call.
  1330. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1331. DirAddDSAMDirectory call was made.
  1332. rid-> is the recordID in which the identity for the directory will be established.
  1333. password-> the password associated with the rid in the directory world.
  1334. newPassword -> the new password for the directory
  1335. }
  1336.  
  1337. OCESetupChangeDirectoryInfoPB = RECORD
  1338.     qLink: Ptr;
  1339.     reserved1: LONGINT;
  1340.     reserved2: LONGINT;
  1341.     ioCompletion: ProcPtr;
  1342.     ioResult: OSErr;
  1343.     saveA5: LONGINT;
  1344.     reqCode: INTEGER;
  1345.     reserved: ARRAY[1..2] OF LONGINT;
  1346.     serverHint: AddrBlock;
  1347.     dsRefNum: INTEGER;
  1348.     callID: LONGINT;
  1349.     identity: AuthIdentity;
  1350.     gReserved1: LONGINT;
  1351.     gReserved2: LONGINT;
  1352.     gReserved3: LONGINT;
  1353.     clientData: LONGINT;
  1354.     
  1355.     directoryRecordCID: CreationID;        {  --> CreationID for the directory }
  1356.     recordID: RecordIDPtr;                {  --> recordID for the identity }
  1357.     password: RStringPtr;                {  --> password in the directory world }
  1358.     newPassword: RStringPtr;            {  --> new password in the directory }
  1359.     END;
  1360.  
  1361.  
  1362. {
  1363. kOCESetupRemoveDirectoryInfo:
  1364. Using this call an existing identity for a directory under LocalIdentity umbrella
  1365. can be changed.
  1366. ASCreateLocalIdentity should have been done succesfully before making this call.
  1367. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1368. }
  1369.  
  1370. OCESetupRemoveDirectoryInfoPB = RECORD
  1371.     qLink: Ptr;
  1372.     reserved1: LONGINT;
  1373.     reserved2: LONGINT;
  1374.     ioCompletion: ProcPtr;
  1375.     ioResult: OSErr;
  1376.     saveA5: LONGINT;
  1377.     reqCode: INTEGER;
  1378.     reserved: ARRAY[1..2] OF LONGINT;
  1379.     serverHint: AddrBlock;
  1380.     dsRefNum: INTEGER;
  1381.     callID: LONGINT;
  1382.     identity: AuthIdentity;
  1383.     gReserved1: LONGINT;
  1384.     gReserved2: LONGINT;
  1385.     gReserved3: LONGINT;
  1386.     clientData: LONGINT;
  1387.  
  1388.     directoryRecordCID: CreationID;        {  --> CreationID for the directory }
  1389.     END;
  1390.  
  1391.  
  1392. {
  1393. kOCESetupGetDirectoryInfo:
  1394. Using this call info on an existing identity for a particular directory under LocalIdentity umbrella
  1395. can be obtained.
  1396. For the specified directory 'directoryName' and 'discriminator', rid and nativeName will
  1397. returned. Caller must provide appropriate buffer to get back rid and nativeName.
  1398. 'password' will be returned  for  non-ADAP Directories..
  1399. }
  1400.  
  1401. OCESetupGetDirectoryInfoPB = RECORD
  1402.     qLink: Ptr;
  1403.     reserved1: LONGINT;
  1404.     reserved2: LONGINT;
  1405.     ioCompletion: ProcPtr;
  1406.     ioResult: OSErr;
  1407.     saveA5: LONGINT;
  1408.     reqCode: INTEGER;
  1409.     reserved: ARRAY[1..2] OF LONGINT;
  1410.     serverHint: AddrBlock;
  1411.     dsRefNum: INTEGER;
  1412.     callID: LONGINT;
  1413.     identity: AuthIdentity;
  1414.     gReserved1: LONGINT;
  1415.     gReserved2: LONGINT;
  1416.     gReserved3: LONGINT;
  1417.     clientData: LONGINT;
  1418.  
  1419.     directoryName: DirectoryNamePtr;    {  --> directory name }
  1420.     discriminator: DirDiscriminator;    {  --> discriminator for the directory }
  1421.     recordID: RecordIDPtr;                { <--  rid for the directory identity }
  1422.     nativeName: RStringPtr;                { <--  user name in the directory world }
  1423.     password: RStringPtr;                { <--  password in the directory world }
  1424.  
  1425.     END;
  1426.  
  1427.  
  1428.  
  1429. {****************************************************************************
  1430.  
  1431.  
  1432.          Directory Manager operations
  1433.  
  1434.  
  1435. ****************************************************************************}
  1436.  
  1437.  
  1438. { AddRecord }
  1439.  
  1440. DirAddRecordPB = RECORD
  1441.     qLink: Ptr;
  1442.     reserved1: LONGINT;
  1443.     reserved2: LONGINT;
  1444.     ioCompletion: ProcPtr;
  1445.     ioResult: OSErr;
  1446.     saveA5: LONGINT;
  1447.     reqCode: INTEGER;
  1448.     reserved: ARRAY[1..2] OF LONGINT;
  1449.     serverHint: AddrBlock;
  1450.     dsRefNum: INTEGER;
  1451.     callID: LONGINT;
  1452.     identity: AuthIdentity;
  1453.     gReserved1: LONGINT;
  1454.     gReserved2: LONGINT;
  1455.     gReserved3: LONGINT;
  1456.     clientData: LONGINT;
  1457.  
  1458.     aRecord: RecordIDPtr;                {  --> CreationID returned here }
  1459.     allowDuplicate: BOOLEAN;            {  --> }
  1460.     END;
  1461.  
  1462.  
  1463.  
  1464.  
  1465. { DeleteRecord }
  1466.  
  1467. DirDeleteRecordPB = RECORD
  1468.     qLink: Ptr;
  1469.     reserved1: LONGINT;
  1470.     reserved2: LONGINT;
  1471.     ioCompletion: ProcPtr;
  1472.     ioResult: OSErr;
  1473.     saveA5: LONGINT;
  1474.     reqCode: INTEGER;
  1475.     reserved: ARRAY[1..2] OF LONGINT;
  1476.     serverHint: AddrBlock;
  1477.     dsRefNum: INTEGER;
  1478.     callID: LONGINT;
  1479.     identity: AuthIdentity;
  1480.     gReserved1: LONGINT;
  1481.     gReserved2: LONGINT;
  1482.     gReserved3: LONGINT;
  1483.     clientData: LONGINT;
  1484.  
  1485.     aRecord: RecordIDPtr;                {  --> }
  1486.     END;
  1487.  
  1488.  
  1489. { aRecord must contain valid PackedRLI and a CreationID. }
  1490.  
  1491.  
  1492.  
  1493. {********************************************************************************}
  1494. {
  1495. DirEnumerate:
  1496. This call can be used to enumerate both DNodes and records under a specified
  1497. DNode. A DNode is specified by the PackedRLIPtr 'aRLI'.
  1498.  
  1499. startingPoint indicates where to start the enumeration.  Initially,
  1500. it should be set to a value of nil.  After some records are enumerated,
  1501. the client can issue the call again with the same aRLI and recordName and
  1502. typeList. The last received DirEnumSpec in the startingPoint field.  The server
  1503. will continue the enumeration from that record on. if user wants to get back the
  1504. value specified in the startingRecord also, the BOOLEAN 'includeStartingPoint'
  1505. must be set to 'true'. If this is set to 'false', records specified after the
  1506. startingPoint record will be returned.
  1507.  
  1508. sortBy indicates to the server to return the records that match in name-first
  1509. or type-first order.  sortDirection indicates to the server to search in forward
  1510. or backward sort order for RecordIDs Specified.
  1511.  
  1512. RecordIDS and Enumeration Criteria:
  1513.  
  1514. PackedRLIPtr parameter 'aRLI' will be accepted for DNode
  1515. specification.
  1516.  
  1517. One RStringPtr 'recordName' is provided. User is allowed to
  1518. specify a wild card in the name.
  1519.  
  1520. 'typeCount' parameter indicate how many types are in the 'typeList'.
  1521.  
  1522. 'typeList' parmeter is a pointer to an RString array of size 'typeCount'.
  1523.  
  1524. If 'typeCount' is exactly equal to one, a wild card can be specified
  1525. for the entity type; otherwise types have to be completely specified.
  1526.  
  1527. A nil value for 'startingPoint' is allowed when sortDirection specified
  1528. is 'kSortBackwards'. This was not allowed previously.
  1529.  
  1530. 'enumFlags' parameter is a bit field. The following bits can be set:
  1531.     kEnumDistinguishedNameMask to get back records in the cluster data base.
  1532.     kEnumAliasMask to get back record aliases
  1533.     kEnumPseudonymMask to get back record pseudonyms
  1534.     kEnumDNodeMask to get back any children dNodes for the DNode specified in the
  1535.     'aRLI' parameter.
  1536.     kEnumAll is combination of all four values and can be used to enumerate
  1537.     everything under a specified DNode.
  1538.  
  1539. 'requestScriptCode' is input parameter and should be ignored in the Release 1.0
  1540. by all directories (including DSAM directories). However clients are advised to
  1541. set this to desired valid script code for future compatibility.
  1542.  
  1543. 'responseScriptCode' is  output parameter and this will be set when
  1544. DirEnumerateGet call completes successfully (includes kOCEMoreData error case).
  1545. If the 'responseScriptCode' is one of the defined script codes, it indicates
  1546. that entries are sorted in that script code. This value need not be equal to
  1547. the 'requsetScriptCode'. If the value returned is smInvalidScript, then the
  1548. sort order returned can be determined by the feature flags for that directory.
  1549. This may indicate entries may be sorted in some order or not sorted in any
  1550. particular order.
  1551.  
  1552.  
  1553. The results returned for each element will consist of a DirEnumSpec.
  1554. The DirEnumSpec contains 'enumFlag' which indicates the type of entity and a
  1555. union which will have either DNodeID or LocalRecordID depending on the value of 'enumFlag'.
  1556. The 'enumFlag'  will indicate whether the returned element is a
  1557. record(bit: kEnumDistinguishedNameMask) or a alias(bit: kEnumAliasMask) or a
  1558. Pseudonym(kEnumPseudonymMask) or a child DNode(bit: kEnumChildMask).  If the 'enumFlag' value
  1559. is kEnumChildMask, it indicates the value returned in the union is a DNodeID (i.e. 'dNodeNumber'
  1560. is the 'dNodeNumber' of the child dnode(if the directory supports dNodeNumbers, otherwise
  1561. this will be set to zero). The name will be the child dnode name. For other values of the
  1562. 'enumFlag', the value in the union will be LocalRecordID.
  1563.  
  1564.  
  1565. The results will be collected in the 'getBuffer' supplied by the user.
  1566. If buffer can not hold all the data returned 'kOCEMoreData' error will be returned.
  1567.  
  1568. If user receives 'noErr' or 'kOCEMoreData', buffer will contain valid results. A user
  1569. can extract the results in the 'getBuffer' by making DirEnumerateParse' call.
  1570. }
  1571.  
  1572.  
  1573. DirEnumerateGetPB = PACKED RECORD
  1574.     qLink: Ptr;
  1575.     reserved1: LONGINT;
  1576.     reserved2: LONGINT;
  1577.     ioCompletion: ProcPtr;
  1578.     ioResult: OSErr;
  1579.     saveA5: LONGINT;
  1580.     reqCode: INTEGER;
  1581.     reserved: ARRAY[1..2] OF LONGINT;
  1582.     serverHint: AddrBlock;
  1583.     dsRefNum: INTEGER;
  1584.     callID: LONGINT;
  1585.     identity: AuthIdentity;
  1586.     gReserved1: LONGINT;
  1587.     gReserved2: LONGINT;
  1588.     gReserved3: LONGINT;
  1589.     clientData: LONGINT;
  1590.  
  1591.     aRLI: PackedRLIPtr;                    {  --> an RLI specifying the cluster to be enumerated }
  1592.     startingPoint: ^DirEnumSpec;        {  --> }
  1593.     sortBy: DirSortOption;                {  --> }
  1594.     sortDirection: DirSortDirection;    {  --> }
  1595.     dReserved: LONGINT;                    {  --  }
  1596.     nameMatchString: RStringPtr;        {  --> name from which enumeration should start }
  1597.     typesList: ^RStringPtr;                {  --> list of entity types to be enumerated }
  1598.     typeCount: LONGINT;                    {  --> number of types in the list }
  1599.     enumFlags: DirEnumChoices;            {  --> indicates what to enumerate }
  1600.     includeStartingPoint: BOOLEAN;        {  --> if true return the record specified in starting point }
  1601.     padByte: Byte;
  1602.     matchNameHow: DirMatchWith;            {  --> Matching Criteria for nameMatchString }
  1603.     matchTypeHow: DirMatchWith;            {  --> Matching Criteria for typeList }
  1604.     getBuffer: Ptr;                        {  --> }
  1605.     getBufferSize: LONGINT;                {  --> }
  1606.     responseSLRV: SLRV;                    {  <-- response SLRV }
  1607.     END;
  1608.  
  1609.  
  1610. { The EnumerateRecords call-back function is defined as follows: }
  1611. ForEachDirEnumSpec = ProcPtr;
  1612.     { FUNCTION ForEachDirEnumSpec(
  1613.         clientData: LONGINT; enumSpec: DirEnumSpec): BOOLEAN;}
  1614.  
  1615.  
  1616. {
  1617. EnumerateParse:
  1618. After an EnumerateGet call has completed, call EnumerateParse
  1619. to parse through the buffer that was filled in EnumerateGet.
  1620.  
  1621. 'eachEnumSpec' will be called each time to return to the client a
  1622. DirEnumSpec that matches the pattern for enumeration. 'enumFlag' indicates the type
  1623. of information returned in the DirEnumSpec
  1624. The clientData parameter that you pass in the parameter block will be passed
  1625. to 'forEachEnumDSSpecFunc'.  You are free to put anything in clientData - it is intended
  1626. to allow you some way to match the call-back to the original call (example: for; you make more then one aysynchronous EnumerateGet calls and you want to
  1627. associate returned results in some way).
  1628.  
  1629. The client should return FALSE from 'eachEnumSpec' to continue
  1630. processing of the EnumerateParse request.  Returning TRUE will
  1631. terminate the EnumerateParse request.
  1632.  
  1633. For synchronous calls, the call-back routine actually runs as part of the same thread
  1634. of execution as the thread that made the EnumerateParse call.  That means that the
  1635. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1636. that were in effect when the call was made.  Because of this, the call-back
  1637. routine has the same restrictions as the caller of EnumerateParse:
  1638. if EnumerateParse was not called from interrupt level, then the call-
  1639. back routine can allocate memory. For asynchronous calls, call-back routine is
  1640. like a ioCompletion except that A5 will be preserved for the application.
  1641. }
  1642.  
  1643. DirEnumerateParsePB = RECORD
  1644.     qLink: Ptr;
  1645.     reserved1: LONGINT;
  1646.     reserved2: LONGINT;
  1647.     ioCompletion: ProcPtr;
  1648.     ioResult: OSErr;
  1649.     saveA5: LONGINT;
  1650.     reqCode: INTEGER;
  1651.     reserved: ARRAY[1..2] OF LONGINT;
  1652.     serverHint: AddrBlock;
  1653.     dsRefNum: INTEGER;
  1654.     callID: LONGINT;
  1655.     identity: AuthIdentity;
  1656.     gReserved1: LONGINT;
  1657.     gReserved2: LONGINT;
  1658.     gReserved3: LONGINT;
  1659.     clientData: LONGINT;
  1660.  
  1661.     aRLI: PackedRLIPtr;                    {  --> an RLI specifying the cluster to be enumerated }
  1662.     bReserved: LONGINT;                    {  --  }
  1663.     cReserved: LONGINT;                    {  --  }
  1664.     eachEnumSpec: ForEachDirEnumSpec;    {  --> }
  1665.     eReserved: LONGINT;                    {  --  }
  1666.     fReserved: LONGINT;                    {  --  }
  1667.     gReserved: LONGINT;                    {  --  }
  1668.     hReserved: LONGINT;                    {  --  }
  1669.     iReserved: LONGINT;                    {  --  }
  1670.     getBuffer: Ptr;                        {  --> }
  1671.     getBufferSize: LONGINT;                {  --> }
  1672.     l1Reserved: INTEGER;                 {  --  }
  1673.     l2Reserved: INTEGER;                 {  --  }
  1674.     l3Reserved: INTEGER;                 {  --  }
  1675.     l4Reserved: INTEGER;                 {  --  }
  1676.     END;
  1677.  
  1678. {
  1679.  FindRecordGet operates similarly to DirEnumerate except it returns a list
  1680.  of records instead of records local to a cluster.
  1681. }
  1682.  
  1683. DirFindRecordGetPB = RECORD
  1684.     qLink: Ptr;
  1685.     reserved1: LONGINT;
  1686.     reserved2: LONGINT;
  1687.     ioCompletion: ProcPtr;
  1688.     ioResult: OSErr;
  1689.     saveA5: LONGINT;
  1690.     reqCode: INTEGER;
  1691.     reserved: ARRAY[1..2] OF LONGINT;
  1692.     serverHint: AddrBlock;
  1693.     dsRefNum: INTEGER;
  1694.     callID: LONGINT;
  1695.     identity: AuthIdentity;
  1696.     gReserved1: LONGINT;
  1697.     gReserved2: LONGINT;
  1698.     gReserved3: LONGINT;
  1699.     clientData: LONGINT;
  1700.  
  1701.     startingPoint:        RecordIDPtr;
  1702.     reservedA:            ARRAY[1..2] OF LONGINT;
  1703.     nameMatchString:    RStringPtr;
  1704.     typesList:            ^RStringPtr;
  1705.     typeCount:            LONGINT;
  1706.     reservedB:            LONGINT;
  1707.     reservedC:            INTEGER;
  1708.     matchNameHow:        DirMatchWith;
  1709.     matchTypeHow:        DirMatchWith;
  1710.     getBuffer:            Ptr;
  1711.     getBufferSize:        LONGINT;
  1712.     directoryName:        DirectoryNamePtr;
  1713.     discriminator:        DirDiscriminator;
  1714.     END;
  1715.  
  1716. { The FindRecordParse call-back function is defined as follows: }
  1717. ForEachRecord = ProcPtr;
  1718.     { FUNCTION ForEachRecord(clientData: LONGINT; enumSpec: DirEnumSpec;
  1719.                              pRLI: PackedRLIPtr): BOOLEAN; }
  1720.  
  1721. {
  1722.  This PB same as DirFindRecordGet except it includes the callback function
  1723. }
  1724.  
  1725. DirFindRecordParsePB = RECORD
  1726.     qLink: Ptr;
  1727.     reserved1: LONGINT;
  1728.     reserved2: LONGINT;
  1729.     ioCompletion: ProcPtr;
  1730.     ioResult: OSErr;
  1731.     saveA5: LONGINT;
  1732.     reqCode: INTEGER;
  1733.     reserved: ARRAY[1..2] OF LONGINT;
  1734.     serverHint: AddrBlock;
  1735.     dsRefNum: INTEGER;
  1736.     callID: LONGINT;
  1737.     identity: AuthIdentity;
  1738.     gReserved1: LONGINT;
  1739.     gReserved2: LONGINT;
  1740.     gReserved3: LONGINT;
  1741.     clientData: LONGINT;
  1742.  
  1743.     startingPoint:        RecordIDPtr;
  1744.     reservedA:            ARRAY[1..2] OF LONGINT;
  1745.     nameMatchString:        RStringPtr;
  1746.     typesList:            ^RStringPtr;
  1747.     typeCount:            LONGINT;
  1748.     reservedB:            LONGINT;
  1749.     reservedC:            INTEGER;
  1750.     matchNameHow:        DirMatchWith;
  1751.     matchTypeHow:        DirMatchWith;
  1752.     getBuffer:            Ptr;
  1753.     getBufferSize:        LONGINT;
  1754.     directoryName:        DirectoryNamePtr;
  1755.     discriminator:        DirDiscriminator;
  1756.     forEachRecordFunc:    ForEachRecord;
  1757.     END;
  1758.  
  1759.  
  1760.  
  1761. {
  1762. LookupGet:
  1763.  
  1764. aRecordList is an array of pointers to RecordIDs, each of which must
  1765. contain valid PackedRLI and a CreationID.  recordIDCount is
  1766. the size of this array.
  1767.  
  1768. attrTypeList is an array of pointers to AttributeTypes.  attrTypeCount is
  1769. the size of this array.
  1770.  
  1771. staringRecordIndex is the record from which to continue the lookup.
  1772. If you want to start from first record in the list, this must be 1 (zero: not).
  1773. This value must always be <= recordIDCount.
  1774.  
  1775. startingAttributeIndex is the AttributeType from which we want to continue the lookup.
  1776. If you want to start from first attribute in the list, this must be 1 (zero: not).
  1777. This value must always be <= attrTypeCount.
  1778.  
  1779. startingAttribute is the value of the attribute value from which we want to
  1780. continue lookup. In case of directories supporting creationIDs, startingAttribute
  1781. may contain only a CID. Other directories may require the entire value.
  1782. If a non-null cid is given and if an attribute value with that cid is not found, this
  1783. call will terminate with kOCENoSuchAttribute error. A client should not make a LookupParse call
  1784. after getting this error.
  1785.  
  1786. 'includeStartingPoint' BOOLEAN can be set to 'true' to receive the value specified in the
  1787. startingPoint in the results returned. If this is set to 'false', the value
  1788. specified in the startingAttribute will not be returned.
  1789.  
  1790. When LookupGet call fails with kOCEMoreData, the client will be able to find out where the call ended
  1791. with a subsequent LookupParse call. When the LookupParse call completes with kOCEMoreData,
  1792. lastRecordIndex, lastAttributeIndex and lastValueCID will point to the corresponding
  1793. recordID, attributeType and the CreationID of the last value returned successfully. These parameters
  1794. are exactly the same ones for the startingRecordIndex, startingAttributeIndex, and startingAttrValueCID
  1795. so they can be used in a subsequent LookupGet call to continue the lookup.
  1796.  
  1797. In an extreme case, It is possible that we had an attribute value that is too large to fit
  1798. in the client's buffer. In such cases, if it was the only thing that we tried to fit
  1799. into the buffer, the client will not able to proceed further because he will not know the
  1800. attributeCID of the attribute to continue with.  Also he does not know how big a buffer
  1801. would be needed for the next call to get this 'mondo' attribute value successfully.
  1802.  
  1803. to support this, LookupParse call will do the following:
  1804.  
  1805. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1806. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1807. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1808. However, if it was not even called once, then the attribute value may be too big to fit in the
  1809. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1810. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1811. ForEachAttributeValue was not called because the user does not have read access to some of
  1812. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1813. any of the attribute values.  A kOCEMoreData error is returned.
  1814.  
  1815. The Toolbox will check for duplicate RecordIDs in the aRecordList. If found, it will return
  1816. 'daDuplicateRecordIDErr'.
  1817.  
  1818. The Toolbox will check for duplicate AttributeTypes in the attrTypeList. If found it will
  1819. return 'daDuplicateAttrTypeErr'.
  1820. }
  1821.  
  1822. DirLookupGetPB = RECORD
  1823.     qLink: Ptr;
  1824.     reserved1: LONGINT;
  1825.     reserved2: LONGINT;
  1826.     ioCompletion: ProcPtr;
  1827.     ioResult: OSErr;
  1828.     saveA5: LONGINT;
  1829.     reqCode: INTEGER;
  1830.     reserved: ARRAY[1..2] OF LONGINT;
  1831.     serverHint: AddrBlock;
  1832.     dsRefNum: INTEGER;
  1833.     callID: LONGINT;
  1834.     identity: AuthIdentity;
  1835.     gReserved1: LONGINT;
  1836.     gReserved2: LONGINT;
  1837.     gReserved3: LONGINT;
  1838.     clientData: LONGINT;
  1839.  
  1840.     aRecordList: ^RecordIDPtr;            {  --> an array of RecordID pointers }
  1841.     attrTypeList: ^AttributeTypePtr;    {  --> an array of attribute types }
  1842.     cReserved: LONGINT;                    {  --  }
  1843.     dReserved: LONGINT;                    {  --  }
  1844.     eReserved: LONGINT;                    {  --  }
  1845.     fReserved: LONGINT;                    {  --  }
  1846.     recordIDCount: LONGINT;                {  --> }
  1847.     attrTypeCount: LONGINT;                {  --> }
  1848.     includeStartingPoint: BOOLEAN;        {  --> if true return the value specified by the starting indices }
  1849. {    padByte: Byte;    }
  1850.     i1Reserved: INTEGER;                {  --  }
  1851.     getBuffer: Ptr;                        {  --> }
  1852.     getBufferSize: LONGINT;                {  --> }
  1853.     startingRecordIndex: LONGINT;        {  --> start from this record }
  1854.     startingAttrTypeIndex: LONGINT;        {  --> start from this attribute type }
  1855.     startingAttribute: Attribute;        {  --> start from this attribute value }
  1856.     pReserved: LONGINT;                    {  --  }
  1857.     END;
  1858.  
  1859.  
  1860. { The Lookup call-back functions are defined as follows: }
  1861.  
  1862. ForEachLookupRecordID = ProcPtr;        { FUNCTION ForEachLookupRecordID(clientData: long; recordID: RecordID): BOOLEAN;}
  1863. ForEachAttrTypeLookup = ProcPtr;        { FUNCTION ForEachAttrTypeLookup(clientData: long; attrType: AttributeTypePtr; myAttrAccMask: AccessMask): BOOLEAN;}
  1864. ForEachAttrValue = ProcPtr;        { FUNCTION ForEachAttrValue(clientData: long; attribute: Attribute): BOOLEAN;}
  1865.  
  1866.  
  1867. {
  1868. LookupParse:
  1869.  
  1870. After a LookupGet call has completed, call LookupParse
  1871. to parse through the buffer that was filled in LookupGet.  The
  1872. toolbox will parse through the buffer and call the appropriate call-back routines
  1873. for each item in the getBuffer.
  1874.  
  1875. 'eachRecordID' will be called each time to return to the client one of the
  1876. RecordIDs from aRecordList.  The clientData parameter that you
  1877. pass in the parameter block will be passed to eachRecordID.
  1878. You are free to put anything in clientData - it is intended to allow
  1879. you some way to match the call-back to the original call (case: in; example: for; you make simultaneous asynchronous LookupGet calls).  If you don't
  1880. want to get a call-back for each RecordID (example: for; if you're looking up
  1881. attributes for only one RecordID), pass nil for eachRecordID.
  1882.  
  1883. After forEachLocalRecordIDFunc is called, eachAttrType may be called to pass an
  1884. attribute type (one from attrTypeList) that exists in the record specified
  1885. in the last eachRecordID call.  If you don't want to get a call-back for
  1886. each AttributeType (example: for; if you're looking up only one attribute type,
  1887. or you prefer to read the type from the Attribute struct during the eachAttrValue
  1888. call-back routine), pass nil for eachAttrType. However access controls may
  1889. prohibit you from reading some attribute types; in that case eachAttrValue
  1890. may not be called even though the value exists. Hence the client should
  1891. supply this call-back function to see the access controls for each attribute type.
  1892.  
  1893. This will be followed by one or more calls to eachAttrValue, to pass the
  1894. type, tag, and attribute value.  NOTE THIS CHANGE:  you are no longer expected to
  1895. pass a pointer to a buffer in which to put the value.  Now you get a pointer to
  1896. the value, and you can process it within the call-back routine.
  1897. After one or more values are returned, eachAttrType may be called again to pass
  1898. another attribute type that exists in the last-specified RecordID.
  1899.  
  1900. The client should return FALSE from eachRecordID, eachAttrType, and
  1901. eachAttrValue to continue processing of the LookupParse request.  Returning TRUE
  1902. from any call-back will terminate the LookupParse request.
  1903.  
  1904. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1905. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1906. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1907. However, if it was not even called once, then the attribute value may be too big to fit in the
  1908. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1909. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1910. ForEachAttributeValue was not called because the user does not have read access to some of
  1911. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1912. any of the attribute values.  A kOCEMoreData error is returned.
  1913.  
  1914. For synchronous calls, the call-back routine actually runs as part of the same thread
  1915. of execution as the thread that made the LookupParse call.  That means that the
  1916. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1917. that were in effect when the call was made.  Because of this, the call-back
  1918. routine has the same restrictions as the caller of LookupParse:
  1919. if LookupParse was not called from interrupt level, then the call-
  1920. back routine can allocate memory. For asynchronous calls, call-back routine is
  1921. like a ioCompletion except that A5 will be preserved for the application.
  1922. }
  1923.  
  1924. DirLookupParsePB = RECORD
  1925.     qLink: Ptr;
  1926.     reserved1: LONGINT;
  1927.     reserved2: LONGINT;
  1928.     ioCompletion: ProcPtr;
  1929.     ioResult: OSErr;
  1930.     saveA5: LONGINT;
  1931.     reqCode: INTEGER;
  1932.     reserved: ARRAY[1..2] OF LONGINT;
  1933.     serverHint: AddrBlock;
  1934.     dsRefNum: INTEGER;
  1935.     callID: LONGINT;
  1936.     identity: AuthIdentity;
  1937.     gReserved1: LONGINT;
  1938.     gReserved2: LONGINT;
  1939.     gReserved3: LONGINT;
  1940.     clientData: LONGINT;
  1941.  
  1942.     aRecordList: ^RecordIDPtr;            {  --> must be same from the corresponding Get call }
  1943.     attrTypeList: ^AttributeTypePtr;    {  --> must be same from the corresponding Get call }
  1944.     cReserved: LONGINT;                    {  --  }
  1945.     eachRecordID: ForEachLookupRecordID;{  --> }
  1946.     eachAttrType: ForEachAttrTypeLookup;{  --> }
  1947.     eachAttrValue: ForEachAttrValue;    {  --> }
  1948.     recordIDCount: LONGINT;                {  --> must be same from the corresponding Get call }
  1949.     attrTypeCount: LONGINT;                {  --> must be same from the corresponding Get call }
  1950.     iReserved: LONGINT;                    {  --  }
  1951.     getBuffer: Ptr;                        {  --> must be same from the corresponding Get call}
  1952.     getBufferSize: LONGINT;                {  --> must be same from the corresponding Get call}
  1953.     lastRecordIndex: LONGINT;            { <--  last RecordID processed when parse completed }
  1954.     lastAttributeIndex: LONGINT;        { <--  last Attribute Type processed when parse completed }
  1955.     lastAttribute: Attribute;            { <--  last attribute value (with this CreationID) processed when parse completed }
  1956.     attrSize: LONGINT;                    { <--  length of the attribute we did not return }
  1957.     END;
  1958.  
  1959.  
  1960.  
  1961.  
  1962. { AddAttributeValue }
  1963.  
  1964. DirAddAttributeValuePB = RECORD
  1965.     qLink: Ptr;
  1966.     reserved1: LONGINT;
  1967.     reserved2: LONGINT;
  1968.     ioCompletion: ProcPtr;
  1969.     ioResult: OSErr;
  1970.     saveA5: LONGINT;
  1971.     reqCode: INTEGER;
  1972.     reserved: ARRAY[1..2] OF LONGINT;
  1973.     serverHint: AddrBlock;
  1974.     dsRefNum: INTEGER;
  1975.     callID: LONGINT;
  1976.     identity: AuthIdentity;
  1977.     gReserved1: LONGINT;
  1978.     gReserved2: LONGINT;
  1979.     gReserved3: LONGINT;
  1980.     clientData: LONGINT;
  1981.  
  1982.     aRecord: RecordIDPtr;                {  --> }
  1983.     attr: AttributePtr;                    {  --> AttributeCreationID returned here }
  1984.     END;
  1985.  
  1986.  
  1987. {
  1988. aRecord must contain valid PackedRLI and a CreationID.
  1989.  
  1990. Instead of passing type, length, and value in three separate
  1991. fields, we take a pointer to an Attribute structure that contains
  1992. all three, and has room for the AttributeCreationNumber.
  1993. The AttributeCreationID will be returned in the attr itself.
  1994.  
  1995. The AttributeTag tells the directory service that the attribute is an RString,
  1996. binary, or a RecordID.
  1997. }
  1998.  
  1999. {
  2000. DeleteAttributeType:
  2001. This call is provided so that an existing AttributeType can be deleted.
  2002. If any attribute values exist for this type, they will all be deleted
  2003. (if the user has access rights to delete the values) and then the attribute type
  2004. will be deleted. Otherwise dsAccessDenied error will be returned.
  2005. }
  2006.  
  2007. DirDeleteAttributeTypePB = RECORD
  2008.     qLink: Ptr;
  2009.     reserved1: LONGINT;
  2010.     reserved2: LONGINT;
  2011.     ioCompletion: ProcPtr;
  2012.     ioResult: OSErr;
  2013.     saveA5: LONGINT;
  2014.     reqCode: INTEGER;
  2015.     reserved: ARRAY[1..2] OF LONGINT;
  2016.     serverHint: AddrBlock;
  2017.     dsRefNum: INTEGER;
  2018.     callID: LONGINT;
  2019.     identity: AuthIdentity;
  2020.     gReserved1: LONGINT;
  2021.     gReserved2: LONGINT;
  2022.     gReserved3: LONGINT;
  2023.     clientData: LONGINT;
  2024.  
  2025.     aRecord: RecordIDPtr;                {  --> }
  2026.     attrType: AttributeTypePtr;            {  --> }
  2027.     END;
  2028.  
  2029.  
  2030. {
  2031.     DeleteAttributeValue
  2032. }
  2033. DirDeleteAttributeValuePB = RECORD
  2034.     qLink: Ptr;
  2035.     reserved1: LONGINT;
  2036.     reserved2: LONGINT;
  2037.     ioCompletion: ProcPtr;
  2038.     ioResult: OSErr;
  2039.     saveA5: LONGINT;
  2040.     reqCode: INTEGER;
  2041.     reserved: ARRAY[1..2] OF LONGINT;
  2042.     serverHint: AddrBlock;
  2043.     dsRefNum: INTEGER;
  2044.     callID: LONGINT;
  2045.     identity: AuthIdentity;
  2046.     gReserved1: LONGINT;
  2047.     gReserved2: LONGINT;
  2048.     gReserved3: LONGINT;
  2049.     clientData: LONGINT;
  2050.  
  2051.     aRecord: RecordIDPtr;                {  -> }
  2052.     attr: AttributePtr;                    {  -> }
  2053.     END;
  2054.  
  2055.  
  2056.  
  2057.  
  2058. {
  2059.     ChangeAttributeValue:
  2060.     currentAttr ==> the attribute to be changed. For ADAS and PAB CreationID is
  2061.                     sufficient
  2062.     newAttr     ==> new value for the attribute. For ADAS and PAB
  2063.                     CreationID field will be set when
  2064.                     the call succeesfully completes
  2065.  
  2066.     aRecord     ==> must contain valid PackedRecordLocationInfo and a CreationID.
  2067. }
  2068.  
  2069. DirChangeAttributeValuePB = RECORD
  2070.     qLink: Ptr;
  2071.     reserved1: LONGINT;
  2072.     reserved2: LONGINT;
  2073.     ioCompletion: ProcPtr;
  2074.     ioResult: OSErr;
  2075.     saveA5: LONGINT;
  2076.     reqCode: INTEGER;
  2077.     reserved: ARRAY[1..2] OF LONGINT;
  2078.     serverHint: AddrBlock;
  2079.     dsRefNum: INTEGER;
  2080.     callID: LONGINT;
  2081.     identity: AuthIdentity;
  2082.     gReserved1: LONGINT;
  2083.     gReserved2: LONGINT;
  2084.     gReserved3: LONGINT;
  2085.     clientData: LONGINT;
  2086.  
  2087.     aRecord: RecordIDPtr;                {  -> }
  2088.     currentAttr: AttributePtr;            {  -> }
  2089.     newAttr: AttributePtr;                {  -> }
  2090.     END;
  2091.  
  2092.  
  2093. { VerifyAttributeValue }
  2094.  
  2095. DirVerifyAttributeValuePB = RECORD
  2096.     qLink: Ptr;
  2097.     reserved1: LONGINT;
  2098.     reserved2: LONGINT;
  2099.     ioCompletion: ProcPtr;
  2100.     ioResult: OSErr;
  2101.     saveA5: LONGINT;
  2102.     reqCode: INTEGER;
  2103.     reserved: ARRAY[1..2] OF LONGINT;
  2104.     serverHint: AddrBlock;
  2105.     dsRefNum: INTEGER;
  2106.     callID: LONGINT;
  2107.     identity: AuthIdentity;
  2108.     gReserved1: LONGINT;
  2109.     gReserved2: LONGINT;
  2110.     gReserved3: LONGINT;
  2111.     clientData: LONGINT;
  2112.  
  2113.     aRecord: RecordIDPtr;                {  --> }
  2114.     attr: AttributePtr;                    {  --> }
  2115.     END;
  2116.  
  2117.  
  2118. {
  2119. aRecord must contain valid PackedRLI and a CreationID.
  2120.  
  2121. The attribute type and value are passed in the attribute structure.  If the
  2122. attribute CreationID is non-zero, the server will verify that an attribute with
  2123. the specified value and creation number exists in aRecord.  If the attribute
  2124. CreationID is zero, the server will verify the attribute by type and value
  2125. alone, and return the attribute CreationID in the Attribute struct if the
  2126. attribute exists.
  2127. }
  2128.  
  2129.  
  2130. {
  2131. EnumerateAttributeTypesGet:
  2132. The following two calls can be used to enumerate the attribute types present in
  2133. a specified RecordID.  The first, EnumerateAttributeTypesGet, processes the request
  2134. and reads the response into getBuffer, as much as will fit.  A kOCEMoreData error will
  2135. be returned if the buffer was not large enough.  After this call completes, the
  2136. client can call EnumerateAttributeTypesParse (below: see).
  2137.  
  2138. The user will able to continue from a startingPoint by setting a startingAttrType.
  2139. Typically, this should be the last value returned in EnumerateAttributeTypesParse call
  2140. when 'kOCEMoreData' is returned.
  2141.  
  2142. If 'includeStartingPoint' is true when a 'startingAttrType' is specified, the starting value
  2143. will be included in the results, if it exists. If this is set to false, this value will not
  2144. be included. AttributeTypes following this type will be returned.
  2145. }
  2146.  
  2147. DirEnumerateAttributeTypesGetPB = PACKED RECORD
  2148.     qLink: Ptr;
  2149.     reserved1: LONGINT;
  2150.     reserved2: LONGINT;
  2151.     ioCompletion: ProcPtr;
  2152.     ioResult: OSErr;
  2153.     saveA5: LONGINT;
  2154.     reqCode: INTEGER;
  2155.     reserved: ARRAY[1..2] OF LONGINT;
  2156.     serverHint: AddrBlock;
  2157.     dsRefNum: INTEGER;
  2158.     callID: LONGINT;
  2159.     identity: AuthIdentity;
  2160.     gReserved1: LONGINT;
  2161.     gReserved2: LONGINT;
  2162.     gReserved3: LONGINT;
  2163.     clientData: LONGINT;
  2164.  
  2165.     aRecord: RecordIDPtr;                {  --> }
  2166.     startingAttrType: AttributeTypePtr;    {  --> starting point }
  2167.     cReserved: LONGINT;                    {  --  }
  2168.     dReserved: LONGINT;                    {  --  }
  2169.     eReserved: LONGINT;                    {  --  }
  2170.     fReserved: LONGINT;                    {  --  }
  2171.     gReserved: LONGINT;                    {  --  }
  2172.     hReserved: LONGINT;                    {  --  }
  2173.     includeStartingPoint: BOOLEAN;        {  --> if true return the attrType specified by starting point }
  2174.     padByte: Byte;
  2175.     i1Reserved: INTEGER;                {  --  }
  2176.     getBuffer: Ptr;                        {  --> }
  2177.     getBufferSize: LONGINT;                {  --> }
  2178.     END;
  2179.  
  2180.  
  2181. { The call-back function is defined as follows: }
  2182. ForEachAttrType = ProcPtr;
  2183.     { FUNCTION ForEachAttrType(clientData: long; attrType: AttributeType): BOOLEAN;}
  2184.  
  2185.  
  2186. {
  2187. EnumerateAttributeTypesParse:
  2188. After an EnumerateAttributeTypesGet call has completed, call EnumerateAttributeTypesParse
  2189. to parse through the buffer that was filled in EnumerateAttributeTypesGet.  The
  2190. toolbox will parse through the buffer and call the call-back routine for
  2191. each attribute type in the getBuffer.
  2192.  
  2193. The client should return false from eachAttrType to continue
  2194. processing of the EnumerateAttributeTypesParse request.  Returning true will
  2195. terminate the EnumerateAttributeTypesParse request.  The clientData parameter that
  2196. you pass in the parameter block will be passed to eachAttrType.
  2197. You are free to put anything in clientData - it is intended to allow
  2198. you some way to match the call-back to the original call (case: in; example: for; you make simultaneous asynchronous calls).
  2199.  
  2200. For synchronous calls, the call-back routine actually runs as part of the same thread
  2201. of execution as the thread that made the EnumerateAttributeTypesParse call.  That means that the
  2202. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2203. that were in effect when the call was made.  Because of this, the call-back
  2204. routine has the same restrictions as the caller of EnumerateAttributeTypesParse.
  2205. If EnumerateAttributeTypesParse was not called from interrupt level, then the call-
  2206. back routine can allocate memory. For asynchronous calls, call-back routine is
  2207. like a ioCompletion except that A5 will be preserved for the application.
  2208. }
  2209.  
  2210. DirEnumerateAttributeTypesParsePB = RECORD
  2211.     qLink: Ptr;
  2212.     reserved1: LONGINT;
  2213.     reserved2: LONGINT;
  2214.     ioCompletion: ProcPtr;
  2215.     ioResult: OSErr;
  2216.     saveA5: LONGINT;
  2217.     reqCode: INTEGER;
  2218.     reserved: ARRAY[1..2] OF LONGINT;
  2219.     serverHint: AddrBlock;
  2220.     dsRefNum: INTEGER;
  2221.     callID: LONGINT;
  2222.     identity: AuthIdentity;
  2223.     gReserved1: LONGINT;
  2224.     gReserved2: LONGINT;
  2225.     gReserved3: LONGINT;
  2226.     clientData: LONGINT;
  2227.  
  2228.     aRecord: RecordIDPtr;                {  --> Same as DirEnumerateAttributeTypesGetPB }
  2229.     bReserved: LONGINT;                    {  --  }
  2230.     cReserved: LONGINT;                    {  --  }
  2231.     dReserved: LONGINT;                    {  --  }
  2232.     eachAttrType: ForEachAttrType;        {  --> }
  2233.     fReserved: LONGINT;                    {  --  }
  2234.     gReserved: LONGINT;                    {  --  }
  2235.     hReserved: LONGINT;                    {  --  }
  2236.     iReserved: LONGINT;                    {  --  }
  2237.     getBuffer: Ptr;                        {  --> }
  2238.     getBufferSize: LONGINT;                {  --> }
  2239.     END;
  2240.  
  2241.  
  2242. {
  2243. DirAbort:
  2244. With this call a user will able to abort an outstanding directory service call.
  2245. A user must pass a pointer to the parameter block for the outstanding call.
  2246. In the current version of the product, the toolbox will process this call
  2247. for NetSearchADAPDirectoriesGet or FindADAPDirectoryByNetSearch calls and if possible
  2248. it will abort. For other calls for ADAP and PAB this will return 'daAbortFailErr'.
  2249. For DSAM directories, this call will be passed to the corresponding DSAM driver.
  2250. The DSAM driver may process this call or may return 'daAbortFailErr'. This call can
  2251. be called only in synchronous mode. Since the abort call makes references to fields in
  2252. the pb associated with the original call, this pb must not be disposed or or altered if
  2253. the original call completes before the abort call has completed.
  2254. }
  2255.  
  2256. DirAbortPB = RECORD
  2257.     qLink: Ptr;
  2258.     reserved1: LONGINT;
  2259.     reserved2: LONGINT;
  2260.     ioCompletion: ProcPtr;
  2261.     ioResult: OSErr;
  2262.     saveA5: LONGINT;
  2263.     reqCode: INTEGER;
  2264.     reserved: ARRAY[1..2] OF LONGINT;
  2265.     serverHint: AddrBlock;
  2266.     dsRefNum: INTEGER;
  2267.     callID: LONGINT;
  2268.     identity: AuthIdentity;
  2269.     gReserved1: LONGINT;
  2270.     gReserved2: LONGINT;
  2271.     gReserved3: LONGINT;
  2272.     clientData: LONGINT;
  2273.  
  2274.     pb: Ptr;                            {  --> pb for the call which must be aborted }
  2275.                                         { ^DirParamBlock }
  2276.     END;
  2277.  
  2278.  
  2279.  
  2280. {
  2281. AddPseudonym:
  2282. An alternate name and type can be added to a given record. If allowDuplicate
  2283. is set the name and type will be added even if the same name and type already
  2284. exists.
  2285. }
  2286.  
  2287. DirAddPseudonymPB = RECORD
  2288.     qLink: Ptr;
  2289.     reserved1: LONGINT;
  2290.     reserved2: LONGINT;
  2291.     ioCompletion: ProcPtr;
  2292.     ioResult: OSErr;
  2293.     saveA5: LONGINT;
  2294.     reqCode: INTEGER;
  2295.     reserved: ARRAY[1..2] OF LONGINT;
  2296.     serverHint: AddrBlock;
  2297.     dsRefNum: INTEGER;
  2298.     callID: LONGINT;
  2299.     identity: AuthIdentity;
  2300.     gReserved1: LONGINT;
  2301.     gReserved2: LONGINT;
  2302.     gReserved3: LONGINT;
  2303.     clientData: LONGINT;
  2304.  
  2305.     aRecord: RecordIDPtr;                {  --> RecordID to which pseudonym is to be added }
  2306.     pseudonymName: RStringPtr;            {  --> new name to be added as pseudonym }
  2307.     pseudonymType: RStringPtr;            {  --> new name to be added as pseudonym }
  2308.     allowDuplicate: BOOLEAN;            {  --> }
  2309.     END;
  2310.  
  2311.  
  2312. {
  2313. DeletePseudonym:
  2314. An alternate name and type for a given record can be deleted.
  2315. }
  2316.  
  2317. DirDeletePseudonymPB = RECORD
  2318.     qLink: Ptr;
  2319.     reserved1: LONGINT;
  2320.     reserved2: LONGINT;
  2321.     ioCompletion: ProcPtr;
  2322.     ioResult: OSErr;
  2323.     saveA5: LONGINT;
  2324.     reqCode: INTEGER;
  2325.     reserved: ARRAY[1..2] OF LONGINT;
  2326.     serverHint: AddrBlock;
  2327.     dsRefNum: INTEGER;
  2328.     callID: LONGINT;
  2329.     identity: AuthIdentity;
  2330.     gReserved1: LONGINT;
  2331.     gReserved2: LONGINT;
  2332.     gReserved3: LONGINT;
  2333.     clientData: LONGINT;
  2334.  
  2335.     aRecord: RecordIDPtr;                {  --> RecordID to which pseudonym to be added }
  2336.     pseudonymName: RStringPtr;            {  --> pseudonymName to be deleted }
  2337.     pseudonymType: RStringPtr;            {  --> pseudonymType to be deleted }
  2338.     END;
  2339.  
  2340.  
  2341.  
  2342. {
  2343.     AddAlias:
  2344.     This call can be used to create an alias  record. The alias
  2345.     can be created either in the same or different cluster. ADAS will not support
  2346.     this call for this release. A new directory capability flag 'kSupportsAlias' will indicate
  2347.     if the directory supports this call. PAB's will support this call. For the PAB implementation,
  2348.     this call will create a record with the name and type specified an aRecord.
  2349.     This call works exactly like AddRecord.
  2350.     If 'allowDuplicate' is false and another record with same name and type already exists
  2351.     'daNoDupAllowed' error will be returned.
  2352. }
  2353. DirAddAliasPB = RECORD
  2354.     qLink: Ptr;
  2355.     reserved1: LONGINT;
  2356.     reserved2: LONGINT;
  2357.     ioCompletion: ProcPtr;
  2358.     ioResult: OSErr;
  2359.     saveA5: LONGINT;
  2360.     reqCode: INTEGER;
  2361.     reserved: ARRAY[1..2] OF LONGINT;
  2362.     serverHint: AddrBlock;
  2363.     dsRefNum: INTEGER;
  2364.     callID: LONGINT;
  2365.     identity: AuthIdentity;
  2366.     gReserved1: LONGINT;
  2367.     gReserved2: LONGINT;
  2368.     gReserved3: LONGINT;
  2369.     clientData: LONGINT;
  2370.  
  2371.     aRecord: RecordIDPtr;                {  -> }
  2372.     allowDuplicate: BOOLEAN;            {  -> }
  2373.     END;
  2374.  
  2375.  
  2376. {
  2377. DirFindValue:
  2378. This call can be used to find the occurrence of a value. The value
  2379. to be matched is passed in the buffer 'matchingData' field. The current
  2380. ADAP/PAB implementation will match a maximum of 32 bytes of data.
  2381. For attribute values in the PAB/ADAP implementation, only the first 32 bytes will
  2382. be used for comparing the occurrence of data. Search can be restricted to
  2383. a particular record and/or attribute type by specifying 'aRecord' or 'aType'.
  2384. After finding one occurrence, 'startingRecord' and 'startingAttribute'
  2385. can be specified to find the next occurrence of the same value.
  2386. 'sortDirection' can be specified with starting values to search forward or backward.
  2387. When a matching value is found, the 'recordFound' indicates the reccordID in which the
  2388. data occurrence was found, 'attributeFound' indicates the attribute with in which the
  2389. matching data was found. ADAP/PAB implementation returns only the type and creationID of
  2390. attributes. Directories which don't support creationIDs may return the
  2391. complete value; hence this call may need a buffer to hold the data. For ADAP/PAB implementations
  2392. the user has to make a DirLookup call to get the actual data. 'recordFound' and
  2393. 'attributeFound' can be used to initialize 'startingRecord' and 'startingAttribute' to
  2394. find the next occurrence of the value.
  2395. }
  2396.  
  2397. DirFindValuePB = RECORD
  2398.     qLink: Ptr;
  2399.     reserved1: LONGINT;
  2400.     reserved2: LONGINT;
  2401.     ioCompletion: ProcPtr;
  2402.     ioResult: OSErr;
  2403.     saveA5: LONGINT;
  2404.     reqCode: INTEGER;
  2405.     reserved: ARRAY[1..2] OF LONGINT;
  2406.     serverHint: AddrBlock;
  2407.     dsRefNum: INTEGER;
  2408.     callID: LONGINT;
  2409.     identity: AuthIdentity;
  2410.     gReserved1: LONGINT;
  2411.     gReserved2: LONGINT;
  2412.     gReserved3: LONGINT;
  2413.     clientData: LONGINT;
  2414.  
  2415.     aRLI: PackedRLIPtr;                    {  --> an RLI specifying the cluster to be enumerated }
  2416.     aRecord: LocalRecordIDPtr;            {  --> if not nil, look only in this record }
  2417.     attrType: AttributeTypePtr;            {  --> if not nil, look only in this attribute type }
  2418.     startingRecord: LocalRecordIDPtr;    {  --> record in which to start searching }
  2419.     startingAttribute: AttributePtr;    {  --> attribute in which to start searching }
  2420.     recordFound: LocalRecordIDPtr;        { <--  record in which data was found }
  2421.     attributeFound: Attribute;            { <--  attribute in which data was found }
  2422.     matchSize: LONGINT;                    {  --> length of matching bytes }
  2423.     matchingData: Ptr;                    {  --> data bytes to be matched in search }
  2424.     sortDirection: DirSortDirection;    {  --> sort direction (forwards or backwards) }
  2425.     END;
  2426.  
  2427.  
  2428.  
  2429.  
  2430. {
  2431. EnumeratePseudonymGet:
  2432. This call can be used to enumerate the existing pseudonyms for
  2433. a given record specified in 'aRecord'. A starting point can be specified
  2434. by 'startingName' and 'startingType'. If the 'includeStartingPoint' boolean
  2435. is true and a starting point is specified, the name specified by startingName
  2436. and startingType also is returned in the results, if it exists. If this is set to false,
  2437. the pseudonym in startingName and Type is not included.
  2438. Pseudonyms returned in the 'getBuffer' can be extracted by making an
  2439. EnumeratePseudonymParse call. The results will consist of a RecordID with the
  2440. name and type of the pseudonym. If the buffer could not hold all the results, then
  2441. 'kOCEMoreData' error will be returned. The user will be able to continue the call by
  2442. using the last result returned as starting point for the next call.
  2443. }
  2444.  
  2445. DirEnumeratePseudonymGetPB = PACKED RECORD
  2446.     qLink: Ptr;
  2447.     reserved1: LONGINT;
  2448.     reserved2: LONGINT;
  2449.     ioCompletion: ProcPtr;
  2450.     ioResult: OSErr;
  2451.     saveA5: LONGINT;
  2452.     reqCode: INTEGER;
  2453.     reserved: ARRAY[1..2] OF LONGINT;
  2454.     serverHint: AddrBlock;
  2455.     dsRefNum: INTEGER;
  2456.     callID: LONGINT;
  2457.     identity: AuthIdentity;
  2458.     gReserved1: LONGINT;
  2459.     gReserved2: LONGINT;
  2460.     gReserved3: LONGINT;
  2461.     clientData: LONGINT;
  2462.  
  2463.     aRecord: RecordIDPtr;                {  --> }
  2464.     startingName: RStringPtr;            {  --> }
  2465.     startingType: RStringPtr;            {  --> }
  2466.     dReserved: LONGINT;                    {  --  }
  2467.     eReserved: LONGINT;                    {  --  }
  2468.     fReserved: LONGINT;                    {  --  }
  2469.     gReserved: LONGINT;                    {  --  }
  2470.     hReserved: LONGINT;                    {  --  }
  2471.     includeStartingPoint: BOOLEAN;        {  --> if true return the Pseudonym specified by
  2472.                                                 starting point will be included }
  2473.     padByte: Byte;
  2474.     i1Reserved: INTEGER;                {  --  }
  2475.     getBuffer: Ptr;                        {  --> }
  2476.     getBufferSize: LONGINT;                {  --> }
  2477.     END;
  2478.  
  2479.  
  2480. { The call-back function is defined as follows: }
  2481. ForEachRecordID = ProcPtr;
  2482.     { FUNCTION ForEachRecordID(clientData: long; recordID: RecordID): BOOLEAN;}
  2483.  
  2484. {
  2485. EnumeratePseudonymParse:
  2486. The pseudonyms returned in the 'getBuffer' from the EnumeratePseudonymGet call
  2487. can be extracted by using the EnumeratePseudonymParse call. 'eachRecordID'
  2488. will be called for each pseudonym.
  2489.  
  2490. Returning true from any call-back will terminate the EnumeratePseudonymParse call.
  2491.  
  2492. For synchronous calls, the call-back routine actually runs as part of the same thread
  2493. of execution as the thread that made the EnumeratePseudonymParse call.  That means that the
  2494. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2495. that were in effect when the call was made.  Because of this, the call-back
  2496. routine has the same restrictions as the caller of EnumeratePseudonymParse:
  2497. if EnumeratePseudonymParse was not called from interrupt level, then the call-
  2498. back routine can allocate memory. For asynchronous calls, call-back routine is
  2499. like a ioCompletion except that A5 will be preserved for the application.
  2500. }
  2501.  
  2502. DirEnumeratePseudonymParsePB = RECORD
  2503.     qLink: Ptr;
  2504.     reserved1: LONGINT;
  2505.     reserved2: LONGINT;
  2506.     ioCompletion: ProcPtr;
  2507.     ioResult: OSErr;
  2508.     saveA5: LONGINT;
  2509.     reqCode: INTEGER;
  2510.     reserved: ARRAY[1..2] OF LONGINT;
  2511.     serverHint: AddrBlock;
  2512.     dsRefNum: INTEGER;
  2513.     callID: LONGINT;
  2514.     identity: AuthIdentity;
  2515.     gReserved1: LONGINT;
  2516.     gReserved2: LONGINT;
  2517.     gReserved3: LONGINT;
  2518.     clientData: LONGINT;
  2519.  
  2520.     aRecord: RecordIDPtr;                {  --> same as DirEnumerateAliasesGetPB }
  2521.     bReserved: LONGINT;                    {  --  }
  2522.     cReserved: LONGINT;                    {  --  }
  2523.     eachRecordID: ForEachRecordID;        {  --> }
  2524.     eReserved: LONGINT;                    {  --  }
  2525.     fReserved: LONGINT;                    {  --  }
  2526.     gReserved: LONGINT;                    {  --  }
  2527.     hReserved: LONGINT;                    {  --  }
  2528.     iReserved: LONGINT;                    {  --  }
  2529.     getBuffer: Ptr;                        {  --> }
  2530.     getBufferSize: LONGINT;                {  --> }
  2531.     END;
  2532.  
  2533.  
  2534.  
  2535.  
  2536. { GetNameAndType }
  2537.  
  2538. DirGetNameAndTypePB = RECORD
  2539.     qLink: Ptr;
  2540.     reserved1: LONGINT;
  2541.     reserved2: LONGINT;
  2542.     ioCompletion: ProcPtr;
  2543.     ioResult: OSErr;
  2544.     saveA5: LONGINT;
  2545.     reqCode: INTEGER;
  2546.     reserved: ARRAY[1..2] OF LONGINT;
  2547.     serverHint: AddrBlock;
  2548.     dsRefNum: INTEGER;
  2549.     callID: LONGINT;
  2550.     identity: AuthIdentity;
  2551.     gReserved1: LONGINT;
  2552.     gReserved2: LONGINT;
  2553.     gReserved3: LONGINT;
  2554.     clientData: LONGINT;
  2555.  
  2556.     aRecord: RecordIDPtr;                {  --> }
  2557.     END;
  2558.  
  2559.  
  2560. {
  2561. aRecord must contain valid RLI and a CreationID.  It
  2562. must also contain pointers to maximum-length RStrings (name and type fields)
  2563. in which will be returned the record's distinguished name and type.
  2564. }
  2565.  
  2566.  
  2567. {
  2568. SetNameAndType:
  2569. This call can be used to change a name and type for a record. The record
  2570. to be renamed is specified using 'aRecord'.
  2571. 'newName' and 'newType' indicate the name and type to be set.
  2572. 'allowDuplicate' if true indicates that name is to be set even if another
  2573. name and type exactly matches the newName and newType specified.
  2574.  
  2575. 'newName' and 'newType' are required since the directories not supporting
  2576. CreationID require name and type fields in the recordID to identify a given
  2577. record.
  2578. }
  2579.  
  2580. DirSetNameAndTypePB = PACKED RECORD
  2581.     qLink: Ptr;
  2582.     reserved1: LONGINT;
  2583.     reserved2: LONGINT;
  2584.     ioCompletion: ProcPtr;
  2585.     ioResult: OSErr;
  2586.     saveA5: LONGINT;
  2587.     reqCode: INTEGER;
  2588.     reserved: ARRAY[1..2] OF LONGINT;
  2589.     serverHint: AddrBlock;
  2590.     dsRefNum: INTEGER;
  2591.     callID: LONGINT;
  2592.     identity: AuthIdentity;
  2593.     gReserved1: LONGINT;
  2594.     gReserved2: LONGINT;
  2595.     gReserved3: LONGINT;
  2596.     clientData: LONGINT;
  2597.  
  2598.     aRecord: RecordIDPtr;                {  --> }
  2599.     allowDuplicate: BOOLEAN;            {  --> }
  2600.     padByte: Byte;
  2601.     newName: RStringPtr;                {  --> new name for the record }
  2602.     newType: RStringPtr;                {  --> new type for the record }
  2603.     END;
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609. {
  2610. DirGetMetaRecordInfo: This call can be made to obtain
  2611. the MetaRecordInfo for a given record. Information returned
  2612. is 16 bytes of OPAQUE information about the record.
  2613. }
  2614.  
  2615. DirGetRecordMetaInfoPB = RECORD
  2616.     qLink: Ptr;
  2617.     reserved1: LONGINT;
  2618.     reserved2: LONGINT;
  2619.     ioCompletion: ProcPtr;
  2620.     ioResult: OSErr;
  2621.     saveA5: LONGINT;
  2622.     reqCode: INTEGER;
  2623.     reserved: ARRAY[1..2] OF LONGINT;
  2624.     serverHint: AddrBlock;
  2625.     dsRefNum: INTEGER;
  2626.     callID: LONGINT;
  2627.     identity: AuthIdentity;
  2628.     gReserved1: LONGINT;
  2629.     gReserved2: LONGINT;
  2630.     gReserved3: LONGINT;
  2631.     clientData: LONGINT;
  2632.  
  2633.     aRecord: RecordIDPtr;                {  --> }
  2634.     metaInfo: DirMetaInfo;                { <--  }
  2635.     END;
  2636.  
  2637.  
  2638.  
  2639. {
  2640. DirGetDNodeMetaInfo: This call can be made to obtain
  2641. the DNodeMetaInfo for a given Packed RLI. Information returned
  2642. is 16 bytes of OPAQUE information about the DNode.
  2643. }
  2644.  
  2645. DirGetDNodeMetaInfoPB = RECORD
  2646.     qLink: Ptr;
  2647.     reserved1: LONGINT;
  2648.     reserved2: LONGINT;
  2649.     ioCompletion: ProcPtr;
  2650.     ioResult: OSErr;
  2651.     saveA5: LONGINT;
  2652.     reqCode: INTEGER;
  2653.     reserved: ARRAY[1..2] OF LONGINT;
  2654.     serverHint: AddrBlock;
  2655.     dsRefNum: INTEGER;
  2656.     callID: LONGINT;
  2657.     identity: AuthIdentity;
  2658.     gReserved1: LONGINT;
  2659.     gReserved2: LONGINT;
  2660.     gReserved3: LONGINT;
  2661.     clientData: LONGINT;
  2662.  
  2663.     pRLI: PackedRLIPtr;                    {  --> }
  2664.     metaInfo: DirMetaInfo;                { <--  }
  2665.     END;
  2666.  
  2667.  
  2668.  
  2669. {
  2670. EnumerateDirectoriesGet:
  2671. A user can enumerate all the directories installed. This includes installed
  2672. ADAP and DSAM directories. The user can specify a signature as input to restrict
  2673. the results. kDirADAPKind will return only ADAP directories, kDirDSAMKind
  2674. will return all DSAM directories. kDirAllKinds will get both ADAP & DSAM directories.
  2675. A specific signature (e.g. X.500) may be used to get directories with an X.500 signature.
  2676. The information for each directory returned will have directoryName, discriminator and features.
  2677.  
  2678. If the user receives 'noErr' or 'kOCEMoreData', the buffer will contain valid results. A user
  2679. can extract the results in the 'getBuffer' by making an DirEnumerateDirectories call.
  2680.  
  2681. If 'kOCEMoreData' is received, the user can continue enumeration by using the last directory and
  2682. discriminator as startingDirectoryName and staringDirDiscriminator in the next call.
  2683.  
  2684. If 'includeStartingPoint' is true and a starting point is specified,
  2685. the staring point will be returned in the result. If false, it is not included.
  2686. }
  2687.  
  2688. DirEnumerateDirectoriesGetPB = PACKED RECORD
  2689.     qLink: Ptr;
  2690.     reserved1: LONGINT;
  2691.     reserved2: LONGINT;
  2692.     ioCompletion: ProcPtr;
  2693.     ioResult: OSErr;
  2694.     saveA5: LONGINT;
  2695.     reqCode: INTEGER;
  2696.     reserved: ARRAY[1..2] OF LONGINT;
  2697.     serverHint: AddrBlock;
  2698.     dsRefNum: INTEGER;
  2699.     callID: LONGINT;
  2700.     identity: AuthIdentity;
  2701.     gReserved1: LONGINT;
  2702.     gReserved2: LONGINT;
  2703.     gReserved3: LONGINT;
  2704.     clientData: LONGINT;
  2705.  
  2706.     directoryKind: OCEDirectoryKind;            {  --> enumerate directories bearing this signature }
  2707.     startingDirectoryName: DirectoryNamePtr;    {  --> staring directory name }
  2708.     startingDirDiscriminator: DirDiscriminator;    {  --> staring directory discriminator }
  2709.     eReserved: LONGINT;                    {  --  }
  2710.     fReserved: LONGINT;                    {  --  }
  2711.     gReserved: LONGINT;                    {  --  }
  2712.     hReserved: LONGINT;                    {  --  }
  2713.     includeStartingPoint: BOOLEAN;        {  --> if true return the dir specified by starting point }
  2714.     padByte: Byte;
  2715.     i1Reserved: INTEGER;                {  --  }
  2716.     getBuffer: Ptr;                        {  --> }
  2717.     getBufferSize: LONGINT;                {  --> }
  2718.     END;
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724. ForEachDirectory = ProcPtr;
  2725.     { FUNCTION ForEachDirectory(clientData: long; dirName: DirectoryNamePtr;
  2726.         discriminator: DirDiscriminator; features: DirGestalt): BOOLEAN;}
  2727.  
  2728. {
  2729. EnumerateDirectoriesParse:
  2730. The directory info returned in 'getBuffer' from the EnumerateDirectoriesGet call
  2731. can be extracted using the EnumerateDirectoriesParse call. 'eachDirectory' will
  2732. be called for each directory.
  2733.  
  2734. Returning true from any call-back will terminate the EnumerateDirectoriesParse call.
  2735.  
  2736. For synchronous calls, the call-back routine actually runs as part of the same thread
  2737. of execution as the thread that made the EnumerateDirectoriesParse call.  That means that the
  2738. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2739. that were in effect when the call was made.  Because of this, the call-back
  2740. routine has the same restrictions as the caller of EnumerateDirectoriesParse:
  2741. if EnumerateDirectoriesParse was not called from interrupt level, then the call-
  2742. back routine can allocate memory. For asynchronous calls, call-back routine is
  2743. like a ioCompletion except that A5 will be preserved for the application.
  2744.  
  2745. eachDirectory will be called each time to return to the client a
  2746. DirectoryName, DirDiscriminator, and features for that directory.
  2747. }
  2748.  
  2749. DirEnumerateDirectoriesParsePB = RECORD
  2750.     qLink: Ptr;
  2751.     reserved1: LONGINT;
  2752.     reserved2: LONGINT;
  2753.     ioCompletion: ProcPtr;
  2754.     ioResult: OSErr;
  2755.     saveA5: LONGINT;
  2756.     reqCode: INTEGER;
  2757.     reserved: ARRAY[1..2] OF LONGINT;
  2758.     serverHint: AddrBlock;
  2759.     dsRefNum: INTEGER;
  2760.     callID: LONGINT;
  2761.     identity: AuthIdentity;
  2762.     gReserved1: LONGINT;
  2763.     gReserved2: LONGINT;
  2764.     gReserved3: LONGINT;
  2765.     clientData: LONGINT;
  2766.  
  2767.     aReserved: LONGINT;                    {  --  }
  2768.     bReserved: LONGINT;                    {  --  }
  2769.     cReserved: LONGINT;                    {  --  }
  2770.     dReserved: LONGINT;                    {  --  }
  2771.     eachDirectory: ForEachDirectory;    {  --> }
  2772.     fReserved: LONGINT;                    {  --  }
  2773.     gReserved: LONGINT;                    {  --  }
  2774.     hReserved: LONGINT;                    {  --  }
  2775.     iReserved: LONGINT;                    {  --  }
  2776.     getBuffer: Ptr;                        {  --> }
  2777.     getBufferSize: LONGINT;                {  --> }
  2778.     END;
  2779.  
  2780.  
  2781.  
  2782. {
  2783. The Following five call are specific to ADAP Directories. Toolbox
  2784. remembers a list of directories across boots. If any directory service
  2785. call is intended for a ADAP directory, then it must be in the list.
  2786. In order for managing this list, A client (Probably DE will use these
  2787. calls.
  2788. DirAddADAPDirectoryPB: Add a new ADAP directory to the list.
  2789. DirRemoveADAPDirectory: Remove a ADAP directory from the list.
  2790. DirNetSearchADAPDirectoriesGet:   search an internet for adas directories.
  2791. DirNetSearchADAPDirectoriesParse: extract the results obtained NetSearchADAPDirectoriesGet.
  2792. DirFindADAPDirectoryByNetSearch: Find a specified directory through net search.
  2793. }
  2794.  
  2795. {
  2796. NetSearchADAPDirectoriesGet:
  2797. This call can be used to make a network wide search for finding ADAP directories.
  2798. This call will be supported only by 'ADAP' and involve highly expensive
  2799. network operations, so the user is advised to use utmost discretion before
  2800. making this call. The results will be collected in the 'getbuffer' and can be
  2801. extracted using NetSearchADAPDirectoriesParse call. The directoryName,
  2802. the directoryDiscriminator, features and serverHint (AppleTalk address for
  2803. a PathFinder serving that directory) are collected for each directory found
  2804. on the network. If buffer is too small to hold all the directories found on
  2805. the network, a 'kOCEMoreData' error will be returned.
  2806. }
  2807.  
  2808. DirNetSearchADAPDirectoriesGetPB = RECORD
  2809.     qLink: Ptr;
  2810.     reserved1: LONGINT;
  2811.     reserved2: LONGINT;
  2812.     ioCompletion: ProcPtr;
  2813.     ioResult: OSErr;
  2814.     saveA5: LONGINT;
  2815.     reqCode: INTEGER;
  2816.     reserved: ARRAY[1..2] OF LONGINT;
  2817.     serverHint: AddrBlock;
  2818.     dsRefNum: INTEGER;
  2819.     callID: LONGINT;
  2820.     identity: AuthIdentity;
  2821.     gReserved1: LONGINT;
  2822.     gReserved2: LONGINT;
  2823.     gReserved3: LONGINT;
  2824.     clientData: LONGINT;
  2825.  
  2826.     getBuffer: Ptr;                        {  --> }
  2827.     getBufferSize: LONGINT;                {  --> }
  2828.     cReserved: LONGINT;                    {  --  }
  2829.     END;
  2830.  
  2831.  
  2832. ForEachADAPDirectory = ProcPtr;
  2833.     { FUNCTION ForEachADAPDirectory(
  2834.         clientData: long; dirName: DirectoryNamePtr;
  2835.         discriminator: DirDiscriminator; features: DirGestalt;
  2836.         serverHint: AddrBlock): BOOLEAN;}
  2837.  
  2838. {
  2839. DirNetSearchADAPDirectoriesParse:
  2840. This call can be used to extract the results obtained in the 'getBuffer'.
  2841. The directoryName, directoryDiscriminator, features and
  2842. serverHint (AppleTalk address for a PathFinder serving that directory) are
  2843. returned in each call-back. These values may be used to make an
  2844. AddADAPDirectory call.
  2845.  
  2846. Returning TRUE from any call-back will terminate the NetSearchADAPDirectoriesParse request.
  2847.  
  2848. For synchronous calls, the call-back routine actually runs as part of the same thread
  2849. of execution as the thread that made the DirNetSearchADAPDirectoriesParse call. That means that the
  2850. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2851. that were in effect when the call was made.  Because of this, the call-back
  2852. routine has the same restrictions as the caller of DirNetSearchADAPDirectoriesParse:
  2853. if DirNetSearchADAPDirectoriesParse was not called from interrupt level, then the call-
  2854. back routine can allocate memory. For asynchronous calls, call-back routine is
  2855. like a ioCompletion except that A5 will be preserved for the application.
  2856. }
  2857.  
  2858. DirNetSearchADAPDirectoriesParsePB = RECORD
  2859.     qLink: Ptr;
  2860.     reserved1: LONGINT;
  2861.     reserved2: LONGINT;
  2862.     ioCompletion: ProcPtr;
  2863.     ioResult: OSErr;
  2864.     saveA5: LONGINT;
  2865.     reqCode: INTEGER;
  2866.     reserved: ARRAY[1..2] OF LONGINT;
  2867.     serverHint: AddrBlock;
  2868.     dsRefNum: INTEGER;
  2869.     callID: LONGINT;
  2870.     identity: AuthIdentity;
  2871.     gReserved1: LONGINT;
  2872.     gReserved2: LONGINT;
  2873.     gReserved3: LONGINT;
  2874.     clientData: LONGINT;
  2875.  
  2876.     getBuffer: Ptr;                                {  --> }
  2877.     getBufferSize: LONGINT;                        {  --> }
  2878.     eachADAPDirectory: ForEachADAPDirectory;    {  --> }
  2879.     END;
  2880.  
  2881.  
  2882. {
  2883. DirFindADAPDirectoryByNetSearch:
  2884. This call can be used to make a network wide search to find an ADAP directory.
  2885. This call will be supported only by 'ADAP' and involves highly expensive
  2886. network operations, so the user is advised to use utmost discretion before
  2887. making this call. The directory is specified using directoryName and discriminator.
  2888. If 'addToOCESetup' is true, the directory will be automatically added to the setup
  2889. list and will be visible through the EnumerateDirectories call and also
  2890. also a creationID to the directoryRecord will be returned.
  2891. If this parameter is set to 'false', the directory will be added to temporary list
  2892. and will be available for making other directory service calls. The directories
  2893. which are not in the preference directory list will not be visible through the
  2894. EnumerateDirectories call.
  2895. }
  2896.  
  2897. DirFindADAPDirectoryByNetSearchPB = PACKED RECORD
  2898.     qLink: Ptr;
  2899.     reserved1: LONGINT;
  2900.     reserved2: LONGINT;
  2901.     ioCompletion: ProcPtr;
  2902.     ioResult: OSErr;
  2903.     saveA5: LONGINT;
  2904.     reqCode: INTEGER;
  2905.     reserved: ARRAY[1..2] OF LONGINT;
  2906.     serverHint: AddrBlock;
  2907.     dsRefNum: INTEGER;
  2908.     callID: LONGINT;
  2909.     identity: AuthIdentity;
  2910.     gReserved1: LONGINT;
  2911.     gReserved2: LONGINT;
  2912.     gReserved3: LONGINT;
  2913.     clientData: LONGINT;
  2914.  
  2915.     directoryName: DirectoryNamePtr;    {  --> directory name }
  2916.     discriminator: DirDiscriminator;    {  --> discriminate between dup dir names }
  2917.     addToOCESetup: BOOLEAN;                {  --> add this directory to OCE Setup List }
  2918.     padByte: Byte;
  2919.     directoryRecordCID: CreationID;        { <--  creationID for the directory record }
  2920.     END;
  2921.  
  2922.  
  2923.  
  2924. {
  2925. DirAddADAPDirectory:
  2926. The directory specified by 'directoryName' and 'discriminator' will be
  2927. added to the list of directories maintained by the Toolbox. Once added,
  2928. the directory is available across boots, until the directory is removed
  2929. explicitly through a DirRemoveADAPDirectory call.
  2930. If 'serverHint' is not nil, the address provided will be used
  2931. to contact a PathFinder for the directory specified.
  2932. If 'serverHint' is nil or does not point to a valid PathFinder server
  2933. for that directory, this call will fail.
  2934. If 'addToOCESetup' is true, the directory will be automatically added to the setup
  2935. directory list and will be visible through EnumerateDirectories calls and
  2936. also a creationID to the directoryRecord will be returned.
  2937. If this parameter is set to 'false', directory will be added to temprary list
  2938. and will be available for making other directory service calls. The directories
  2939. which are not in the setup  list will not be visible through
  2940. EnumerateDirectories call.
  2941. }
  2942.  
  2943. DirAddADAPDirectoryPB = PACKED RECORD
  2944.     qLink: Ptr;
  2945.     reserved1: LONGINT;
  2946.     reserved2: LONGINT;
  2947.     ioCompletion: ProcPtr;
  2948.     ioResult: OSErr;
  2949.     saveA5: LONGINT;
  2950.     reqCode: INTEGER;
  2951.     reserved: ARRAY[1..2] OF LONGINT;
  2952.     serverHint: AddrBlock;
  2953.     dsRefNum: INTEGER;
  2954.     callID: LONGINT;
  2955.     identity: AuthIdentity;
  2956.     gReserved1: LONGINT;
  2957.     gReserved2: LONGINT;
  2958.     gReserved3: LONGINT;
  2959.     clientData: LONGINT;
  2960.  
  2961.     directoryName: DirectoryNamePtr;    {  --> directory name }
  2962.     discriminator: DirDiscriminator;    {  --> discriminate between dup dir names }
  2963.     addToOCESetup: BOOLEAN;                {  --> add this directory to OCE Setup }
  2964.     padByte: Byte;
  2965.     directoryRecordCID: CreationID;        { <--  creationID for the directory record }
  2966.     END;
  2967.  
  2968.  
  2969.  
  2970.  
  2971. {
  2972. GetDirectoryInfo:
  2973. DirGetDirectoryInfo will do:
  2974.  
  2975. If a 'dsRefNum' is non-Zero, the directory information for
  2976.     the corresponding  PAB will be  returned.
  2977.  If 'dsRefNum' is zero and 'serverHint' is non-zero, If the
  2978.  'serverHint' points to a valid ADAP Directory Server(Finder: Path),
  2979.  the directory information (i.e. directoryName, discriminator, features)
  2980.  for that directory will be returned.
  2981.     If a  vlid directory name and discriminator are provided
  2982.     features (Set of capability flags) for that directory will be returned.
  2983. }
  2984.  
  2985. DirGetDirectoryInfoPB = RECORD
  2986.     qLink: Ptr;
  2987.     reserved1: LONGINT;
  2988.     reserved2: LONGINT;
  2989.     ioCompletion: ProcPtr;
  2990.     ioResult: OSErr;
  2991.     saveA5: LONGINT;
  2992.     reqCode: INTEGER;
  2993.     reserved: ARRAY[1..2] OF LONGINT;
  2994.     serverHint: AddrBlock;
  2995.     dsRefNum: INTEGER;
  2996.     callID: LONGINT;
  2997.     identity: AuthIdentity;
  2998.     gReserved1: LONGINT;
  2999.     gReserved2: LONGINT;
  3000.     gReserved3: LONGINT;
  3001.     clientData: LONGINT;
  3002.  
  3003.     directoryName: DirectoryNamePtr;    {  --> directory name }
  3004.     discriminator: DirDiscriminator;    { <--> descriminate between dup dir names }
  3005.     features: DirGestalt;                { <--  capability bit flags }
  3006.     END;
  3007.     
  3008.     
  3009.     
  3010. {
  3011. pass kThisRecordOwnerMask, kFriendsMask, kAuthenticatedInDNodeMask, kAuthenticatedInDirectoryMask,
  3012. kGuestMask, or kMeMask to this routine, and it will return a pointer to a
  3013. DSSpec that can be used in the Get or Set Access Controls calls.
  3014. }
  3015.  
  3016.  
  3017. FUNCTION OCEGetAccessControlDSSpec(categoryBitMask: CategoryMask): DSSpecPtr;
  3018.     INLINE $303C, kOCEGetAccessControlDSSpec, $AA5C;
  3019.  
  3020. {
  3021.     Note on Access Controls:
  3022.     Access control is based on a list model.
  3023.     You can add Access Controls to a dsObject through set calls.
  3024.     You can get access controls list which gives dsObject and accMask for each dsObject.
  3025.     GetAccessControl can be limited to currently supplied identity by setting forCurrentUserOnly.
  3026.     There are special DSObjects are defined in ADASTypes.h for each of the category
  3027.     supported in ADAS Directories. (kOwner, kFriends, kAuthenticatedToCluster,
  3028.     kAuthenticatedToDirectory, kGuest) and DUGetActlDSSpec call can be used
  3029.     to obtain appropraiate DSSpec before making set calls to ADAS directories.
  3030. }
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036. {
  3037.     GetDNodeAccessControlGet:
  3038.     This call can be done to get back access control list for a DNode.
  3039.     pRLI -> RLI of the DNode whose access control list is sought
  3040.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3041.                       the identity parameter will be returned other wise entire list
  3042.                       will be returned.
  3043.     startingDsObj  -> If this is not nil, list should be started after this object.
  3044.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3045.                               results.
  3046.  
  3047.     The results will be collected in the 'getBuffer' supplied by the user.
  3048.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3049.  
  3050.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3051.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3052.  
  3053.     Results returned for each DSObject will contain DSSpecPtr and three sets of access mask.
  3054. }
  3055.  
  3056. TYPE
  3057. DirGetDNodeAccessControlGetPB = RECORD
  3058.     qLink: Ptr;
  3059.     reserved1: LONGINT;
  3060.     reserved2: LONGINT;
  3061.     ioCompletion: ProcPtr;
  3062.     ioResult: OSErr;
  3063.     saveA5: LONGINT;
  3064.     reqCode: INTEGER;
  3065.     reserved: ARRAY[1..2] OF LONGINT;
  3066.     serverHint: AddrBlock;
  3067.     dsRefNum: INTEGER;
  3068.     callID: LONGINT;
  3069.     identity: AuthIdentity;
  3070.     gReserved1: LONGINT;
  3071.     gReserved2: LONGINT;
  3072.     gReserved3: LONGINT;
  3073.     clientData: LONGINT;
  3074.  
  3075.     pRLI: PackedRLIPtr;                    {  -> RLI of the cluster whose access control list is sought  }
  3076.     bReserved: LONGINT;                  {  -- unused }
  3077.     cReserved: LONGINT;                  {  -- unused }
  3078.     dReserved: LONGINT;                  {  -- unused }
  3079.     eResreved: LONGINT;                 { --> }
  3080.     forCurrentUserOnly: BOOLEAN;        { -->  }
  3081.     startingPoint: ^DSSpec;             { --> starting Point }
  3082.     includeStartingPoint: BOOLEAN;         {  -> if true return the DsObject
  3083.                                                 specified in starting point }
  3084.     getBuffer: Ptr;                        {    -> }
  3085.     getBufferSize: LONGINT;                {  -> }
  3086.  
  3087.  
  3088.     END;
  3089.  
  3090.  { The Access Control call-back function is defined as follows: }
  3091. ForEachDNodeAccessControl = ProcPtr;
  3092.     { FUNCTION ForEachDNodeAccessControl(
  3093.         clientData: long;
  3094.         dsObj: DSSpec; activeDnodeAccMask: AccessMask;
  3095.         defaultRecordAccMask: AccessMask;
  3096.         defaultAttributeAccMask: AccessMask): BOOLEAN;}
  3097.  
  3098. {
  3099.     GetDNodeAccessControlParse:
  3100.     After an GetDNodeAccessControlGet call has completed,
  3101.     call GetDNodeAccessControlParse to parse through the buffer that
  3102.     that was filled in GetDNodeAccessControlGet.
  3103.  
  3104.     'eachObject' will be called each time to return to the client a
  3105.     DsObject and a set of three accMasks (three LONGINT words) for that object.
  3106.     Acceesmasks returned apply to the dsObject in the callback :
  3107.     1. Currently Active Access mask for the specified DNode.
  3108.     2. Default Access mask for any Record in the DNode
  3109.     3. Default Access mask for any Attribute in the DNode
  3110.     The clientData parameter that you pass in the parameter block will be passed
  3111.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3112.     to allow you some way to match the call-back to the original call (example: for; you make more then one aysynchronous GetDNodeAccessControlGet calls and you want to
  3113.     associate returned results in some way).
  3114.  
  3115.     The client should return FALSE from 'eachObject' to continue
  3116.     processing of the GetDNodeAccessControlParse request.  Returning TRUE will
  3117.     terminate the GetDNodeAccessControlParse request.
  3118.  
  3119.     For synchronous calls, the call-back routine actually runs as part of the same thread
  3120.     of execution as the thread that made the GetDNodeAccessControlParse call.  That means that the
  3121.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3122.     that were in effect when the call was made.  Because of this, the call-back
  3123.     routine has the same restrictions as the caller of GetDNodeAccessControlParse:
  3124.     if GetDNodeAccessControlParse was not called from interrupt level, then the call-
  3125.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3126.     like a ioCompletion except that A5 will be preserved for the application.
  3127. }
  3128.  
  3129.  
  3130. DirGetDNodeAccessControlParsePB = RECORD
  3131.     qLink: Ptr;
  3132.     reserved1: LONGINT;
  3133.     reserved2: LONGINT;
  3134.     ioCompletion: ProcPtr;
  3135.     ioResult: OSErr;
  3136.     saveA5: LONGINT;
  3137.     reqCode: INTEGER;
  3138.     reserved: ARRAY[1..2] OF LONGINT;
  3139.     serverHint: AddrBlock;
  3140.     dsRefNum: INTEGER;
  3141.     callID: LONGINT;
  3142.     identity: AuthIdentity;
  3143.     gReserved1: LONGINT;
  3144.     gReserved2: LONGINT;
  3145.     gReserved3: LONGINT;
  3146.     clientData: LONGINT;
  3147.  
  3148.     pRLI: PackedRLIPtr;                        {  -> RLI of the cluster  }
  3149.     bReserved: LONGINT;                      {  -- unused }
  3150.     cReserved: LONGINT;                      {  -- unused }
  3151.     dReserved: LONGINT;                      {  -- unused }
  3152.     eachObject: ForEachDNodeAccessControl;     { --> }
  3153.     forCurrentUserOnly: BOOLEAN;             { -->  }
  3154.     startingPoint: ^DSSpec;                 { --> starting Point }
  3155.     includeStartingPoint: BOOLEAN;             {  -> if true return the record
  3156.                                                 specified in starting point }
  3157.     getBuffer: Ptr;                            {    -> }
  3158.     getBufferSize: LONGINT;                    {  -> }
  3159.     END;
  3160.  
  3161.  
  3162. {
  3163.     GetRecordAccessControlGet:
  3164.     This call can be done to get back access control list for a RecordID.
  3165.     aRecord -> RecordID to which access control list is sought
  3166.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3167.                       the identity parameter will be returned other wise entire list
  3168.                       will be returned.
  3169.     startingDsObj  -> If this is not nil, list should be started after this object.
  3170.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3171.                               results.
  3172.  
  3173.     The results will be collected in the 'getBuffer' supplied by the user.
  3174.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3175.  
  3176.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3177.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3178.  
  3179.     Results returned for each DSObject will contain DSSpecPtr and accMask.
  3180. }
  3181.  
  3182.  
  3183. DirGetRecordAccessControlGetPB = RECORD
  3184.     qLink: Ptr;
  3185.     reserved1: LONGINT;
  3186.     reserved2: LONGINT;
  3187.     ioCompletion: ProcPtr;
  3188.     ioResult: OSErr;
  3189.     saveA5: LONGINT;
  3190.     reqCode: INTEGER;
  3191.     reserved: ARRAY[1..2] OF LONGINT;
  3192.     serverHint: AddrBlock;
  3193.     dsRefNum: INTEGER;
  3194.     callID: LONGINT;
  3195.     identity: AuthIdentity;
  3196.     gReserved1: LONGINT;
  3197.     gReserved2: LONGINT;
  3198.     gReserved3: LONGINT;
  3199.     clientData: LONGINT;
  3200.  
  3201.     aRecord: RecordIDPtr;                {  -> RecordID to which access control list is sought list is sought  }
  3202.     bReserved: LONGINT;                 {  -- unused }
  3203.     cReserved: LONGINT;                  {  -- unused }
  3204.     dReserved: LONGINT;                 {  -- unused }
  3205.     eResreved: LONGINT;                 { --> }
  3206.     forCurrentUserOnly: BOOLEAN;         { -->  }
  3207.     startingPoint: ^DSSpec;             { --> starting Point }
  3208.     includeStartingPoint: BOOLEAN;         {  -> if true return the DsObject
  3209.                                                 specified in starting point }
  3210.     getBuffer: Ptr;                        {    -> }
  3211.     getBufferSize: LONGINT;                {  -> }
  3212.     END;
  3213.  
  3214.  { The Access Control call-back function is defined as follows: }
  3215. ForEachRecordAccessControl = ProcPtr;
  3216.     { FUNCTION ForEachRecordAccessControl(clientData: long;
  3217.         dsObj: DSSpec; activeDnodeAccMask: AccessMask;
  3218.         activeRecordAccMask: AccessMask;
  3219.         defaultAttributeAccMask: AccessMask): BOOLEAN;}
  3220.  
  3221. {
  3222.     GetRecordAccessControlParse:
  3223.     After an GetRecordAccessControlGet call has completed,
  3224.     call GetRecordAccessControlParse to parse through the buffer that
  3225.     that was filled in GetRecordAccessControlGet.
  3226.  
  3227.     'eachObject' will be called each time to return to the client a
  3228.     DsObject and a set of three accMasks (three LONGINT words) for that object.
  3229.     Acceesmasks returned apply to the dsObject in the callback :
  3230.     1. Active Access mask for the DNode Containing the Record.
  3231.     2. Active Access mask for the Record specified.
  3232.     3. Defualt Access mask for Attributes in the record.
  3233.     The clientData parameter that you pass in the parameter block will be passed
  3234.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3235.     to allow you some way to match the call-back to the original call (example: for; you make more then one aysynchronous GetRecordAccessControlGet calls and you want to
  3236.     associate returned results in some way).
  3237.  
  3238.     The client should return FALSE from 'eachObject' to continue
  3239.     processing of the GetRecordAccessControlParse request.  Returning TRUE will
  3240.     terminate the GetRecordAccessControlParse request.
  3241.  
  3242.     For synchronous calls, the call-back routine actually runs as part of the same thread
  3243.     of execution as the thread that made the GetRecordAccessControlParse call.  That means that the
  3244.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3245.     that were in effect when the call was made.  Because of this, the call-back
  3246.     routine has the same restrictions as the caller of GetRecordAccessControlParse:
  3247.     if GetRecordAccessControlParse was not called from interrupt level, then the call-
  3248.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3249.     like a ioCompletion except that A5 will be preserved for the application.
  3250. }
  3251.  
  3252.  
  3253. DirGetRecordAccessControlParsePB = RECORD
  3254.     qLink: Ptr;
  3255.     reserved1: LONGINT;
  3256.     reserved2: LONGINT;
  3257.     ioCompletion: ProcPtr;
  3258.     ioResult: OSErr;
  3259.     saveA5: LONGINT;
  3260.     reqCode: INTEGER;
  3261.     reserved: ARRAY[1..2] OF LONGINT;
  3262.     serverHint: AddrBlock;
  3263.     dsRefNum: INTEGER;
  3264.     callID: LONGINT;
  3265.     identity: AuthIdentity;
  3266.     gReserved1: LONGINT;
  3267.     gReserved2: LONGINT;
  3268.     gReserved3: LONGINT;
  3269.     clientData: LONGINT;
  3270.  
  3271.     aRecord: RecordIDPtr;                       {  -> RecordID to which access control list is sought list is sought  }
  3272.     bReserved: LONGINT;                      {  -- unused }
  3273.     cReserved: LONGINT;                      {  -- unused }
  3274.     dReserved: LONGINT;                      {  -- unused }
  3275.     eachObject: ForEachRecordAccessControl;    { --> }
  3276.     forCurrentUserOnly: BOOLEAN;             { -->  }
  3277.     startingPoint: ^DSSpec;                 { --> starting Point }
  3278.     includeStartingPoint: BOOLEAN;             {  -> if true return the record
  3279.                                                         specified in starting point }
  3280.     getBuffer: Ptr;                            {    -> }
  3281.     getBufferSize: LONGINT;                    {  -> }
  3282.     END;
  3283.  
  3284.  
  3285. {
  3286.     GetAttributeAccessControlGet:
  3287.     This call can be done to get back access control list for a attributeType with in a RecordID.
  3288.     aRecord -> RecordID to which access control list is sought
  3289.     aType    -> Attribute Type to which access controls are sought
  3290.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3291.                       the identity parameter will be returned other wise entire list
  3292.                       will be returned.
  3293.     startingDsObj  -> If this is not nil, list should be started after this object.
  3294.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3295.                               results.
  3296.  
  3297.     The results will be collected in the 'getBuffer' supplied by the user.
  3298.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3299.  
  3300.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3301.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3302.  
  3303.     Results returned for each DSObject will contain DSSpecPtr and accMask.
  3304. }
  3305.  
  3306.  
  3307. DirGetAttributeAccessControlGetPB = RECORD
  3308.     qLink: Ptr;
  3309.     reserved1: LONGINT;
  3310.     reserved2: LONGINT;
  3311.     ioCompletion: ProcPtr;
  3312.     ioResult: OSErr;
  3313.     saveA5: LONGINT;
  3314.     reqCode: INTEGER;
  3315.     reserved: ARRAY[1..2] OF LONGINT;
  3316.     serverHint: AddrBlock;
  3317.     dsRefNum: INTEGER;
  3318.     callID: LONGINT;
  3319.     identity: AuthIdentity;
  3320.     gReserved1: LONGINT;
  3321.     gReserved2: LONGINT;
  3322.     gReserved3: LONGINT;
  3323.     clientData: LONGINT;
  3324.  
  3325.     aRecord: RecordIDPtr;                {  -> RecordID to which access control list is sought list is sought  }
  3326.     aType: AttributeTypePtr;            {  -> Attribute Type to which access controls are sought          }
  3327.     cReserved: LONGINT;                 {  -- unused }
  3328.     dReserved: LONGINT;                 {  -- unused }
  3329.     eResreved: LONGINT;                 { --> }
  3330.     forCurrentUserOnly: BOOLEAN;         { -->  }
  3331.     startingPoint: ^DSSpec;             { --> starting Point }
  3332.     includeStartingPoint: BOOLEAN;         {  -> if true return the DsObject
  3333.                                                                 specified in starting point }
  3334.     getBuffer: Ptr;                        {    -> }
  3335.     getBufferSize: LONGINT;                {  -> }
  3336.     END;
  3337.  
  3338.  { The Access Control call-back function is defined as follows: }
  3339. ForEachAttributeAccessControl = ProcPtr;
  3340.     { FUNCTION ForEachAttributeAccessControl(clientData: long;
  3341.         dsObj: DSSpec; activeDnodeAccMask: AccessMask;
  3342.         activeRecordAccMask: AccessMask;
  3343.         activeAttributeAccMask: AccessMask): BOOLEAN;}
  3344.  
  3345. {
  3346.     GetAttributeAccessControlParse:
  3347.     After an GetAttributeAccessControlGet call has completed,
  3348.     call GetAttributeAccessControlParse to parse through the buffer that
  3349.     that was filled in GetAttributeAccessControlGet.
  3350.  
  3351.     'eachObject' will be called each time to return to the client a
  3352.     DsObject and a set of three accMasks (three LONGINT words) for that object.
  3353.     Acceesmasks returned apply to the dsObject in the callback :
  3354.     1. Active Access mask for the DNode Containing the Attribute.
  3355.     2. Active Access mask for the Record in the Containing the Attribute.
  3356.     3. Active Access mask for the specified Attribute.
  3357.     The clientData parameter that you pass in the parameter block will be passed
  3358.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3359.     to allow you some way to match the call-back to the original call (example: for; you make more then one aysynchronous GetAttributeAccessControlGet calls and you want to
  3360.     associate returned results in some way).
  3361.  
  3362.     The client should return FALSE from 'eachObject' to continue
  3363.     processing of the GetAttributeAccessControlParse request.  Returning TRUE will
  3364.     terminate the GetAttributeAccessControlParse request.
  3365.  
  3366.     For synchronous calls, the call-back routine actually runs as part of the same thread
  3367.     of execution as the thread that made the GetAttributeAccessControlParse call.  That means that the
  3368.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3369.     that were in effect when the call was made.  Because of this, the call-back
  3370.     routine has the same restrictions as the caller of GetAttributeAccessControlParse:
  3371.     if GetAttributeAccessControlParse was not called from interrupt level, then the call-
  3372.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3373.     like a ioCompletion except that A5 will be preserved for the application.
  3374. }
  3375.  
  3376.  
  3377. DirGetAttributeAccessControlParsePB = RECORD
  3378.     qLink: Ptr;
  3379.     reserved1: LONGINT;
  3380.     reserved2: LONGINT;
  3381.     ioCompletion: ProcPtr;
  3382.     ioResult: OSErr;
  3383.     saveA5: LONGINT;
  3384.     reqCode: INTEGER;
  3385.     reserved: ARRAY[1..2] OF LONGINT;
  3386.     serverHint: AddrBlock;
  3387.     dsRefNum: INTEGER;
  3388.     callID: LONGINT;
  3389.     identity: AuthIdentity;
  3390.     gReserved1: LONGINT;
  3391.     gReserved2: LONGINT;
  3392.     gReserved3: LONGINT;
  3393.     clientData: LONGINT;
  3394.  
  3395.     aRecord: RecordIDPtr;                {  -> RecordID to which access control list is sought list is sought  }
  3396.     aType: AttributeTypePtr;            {  -> Attribute Type to which access controls are sought          }
  3397.     cReserved: LONGINT;                  {  -- unused }
  3398.     dReserved: LONGINT;                  {  -- unused }
  3399.     eachObject: ForEachAttributeAccessControl;     { --> }
  3400.     forCurrentUserOnly: BOOLEAN;         { -->  }
  3401.     startingPoint: ^DSSpec;             { --> starting Point }
  3402.     includeStartingPoint: BOOLEAN;         {  -> if true return the record
  3403.                                                         specified in starting point }
  3404.     getBuffer: Ptr;                        {    -> }
  3405.     getBufferSize: LONGINT;                {  -> }
  3406.     END;
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414. {
  3415. MapPathNameToDNodeNumber:
  3416. This call maps a given PathName within a directory to its DNodeNumber.
  3417. }
  3418.  
  3419. DirMapPathNameToDNodeNumberPB = RECORD
  3420.     qLink: Ptr;
  3421.     reserved1: LONGINT;
  3422.     reserved2: LONGINT;
  3423.     ioCompletion: ProcPtr;
  3424.     ioResult: OSErr;
  3425.     saveA5: LONGINT;
  3426.     reqCode: INTEGER;
  3427.     reserved: ARRAY[1..2] OF LONGINT;
  3428.     serverHint: AddrBlock;
  3429.     dsRefNum: INTEGER;
  3430.     callID: LONGINT;
  3431.     identity: AuthIdentity;
  3432.     gReserved1: LONGINT;
  3433.     gReserved2: LONGINT;
  3434.     gReserved3: LONGINT;
  3435.     clientData: LONGINT;
  3436.  
  3437.     directoryName: DirectoryNamePtr;    {  --> directory name }
  3438.     discriminator: DirDiscriminator;    {  --> discriminator }
  3439.     dNodeNumber: DNodeNum;                { <--  dNodenumber to the path }
  3440.     path: PackedPathNamePtr;            {  --> Path Name to be mapped }
  3441.     END;
  3442.  
  3443.  
  3444. {
  3445. PathName in the path field will be mapped to the cooresponding dNodeNumber and
  3446. returned in the DNodeNumber field. directoryName and descriminator Fields are
  3447. ignored. DSRefNum is used to identify the directory.
  3448. }
  3449.  
  3450.  
  3451.  
  3452. {
  3453. MapDNodeNumberToPathName:
  3454. This call will map a given DNodeNumber with in a directory to the
  3455. corresponding PathName.
  3456. }
  3457.  
  3458. DirMapDNodeNumberToPathNamePB = RECORD
  3459.     qLink: Ptr;
  3460.     reserved1: LONGINT;
  3461.     reserved2: LONGINT;
  3462.     ioCompletion: ProcPtr;
  3463.     ioResult: OSErr;
  3464.     saveA5: LONGINT;
  3465.     reqCode: INTEGER;
  3466.     reserved: ARRAY[1..2] OF LONGINT;
  3467.     serverHint: AddrBlock;
  3468.     dsRefNum: INTEGER;
  3469.     callID: LONGINT;
  3470.     identity: AuthIdentity;
  3471.     gReserved1: LONGINT;
  3472.     gReserved2: LONGINT;
  3473.     gReserved3: LONGINT;
  3474.     clientData: LONGINT;
  3475.  
  3476.     directoryName: DirectoryNamePtr;    {  --> directory name }
  3477.     discriminator: DirDiscriminator;    {  --> discriminator }
  3478.     dNodeNumber: DNodeNum;                {  --> dNodenumber to be mapped }
  3479.     path: PackedPathNamePtr;            { <--  Packed Path Name returned }
  3480.     lengthOfPathName: INTEGER;            {  --> length of packed pathName structure}
  3481.     END;
  3482.  
  3483.  
  3484. {
  3485. dNodeNumber in the DNodeNumber field will be mapped to the cooresponding
  3486. pathName and returned in the PackedPathName field.
  3487. lengthOfPathName is to be set the length of pathName structure.
  3488. If length of PackedPathName is larger then the lengthOfPathName, kOCEMoreData
  3489. OSErr will be returned.
  3490. }
  3491.  
  3492. {
  3493. GetLocalNetworkSpec:
  3494. This call will return the Local NetworkSpec. Client should supply
  3495. an RString big enough to hold the NetworkSpec.
  3496. }
  3497.  
  3498. DirGetLocalNetworkSpecPB = RECORD
  3499.     qLink: Ptr;
  3500.     reserved1: LONGINT;
  3501.     reserved2: LONGINT;
  3502.     ioCompletion: ProcPtr;
  3503.     ioResult: OSErr;
  3504.     saveA5: LONGINT;
  3505.     reqCode: INTEGER;
  3506.     reserved: ARRAY[1..2] OF LONGINT;
  3507.     serverHint: AddrBlock;
  3508.     dsRefNum: INTEGER;
  3509.     callID: LONGINT;
  3510.     identity: AuthIdentity;
  3511.     gReserved1: LONGINT;
  3512.     gReserved2: LONGINT;
  3513.     gReserved3: LONGINT;
  3514.     clientData: LONGINT;
  3515.  
  3516.     directoryName: DirectoryNamePtr;    {  --> directory name }
  3517.     discriminator: DirDiscriminator;    {  --> discriminator }
  3518.     networkSpec: NetworkSpecPtr;        { <--  NetworkSpec }
  3519.     END;
  3520.  
  3521.  
  3522. {
  3523. PathName in the path field must be set to nil. internetName should be large
  3524. enough to hold the internetName. InterNetname returned indicates path finder's
  3525. local internet (configured by administrator).
  3526. }
  3527.  
  3528. {
  3529. GetDNodeInfo:
  3530. This call will return the information (internetName and descriptor)
  3531. for the given RLI of a DNode.
  3532. }
  3533.  
  3534. DirGetDNodeInfoPB = RECORD
  3535.     qLink: Ptr;
  3536.     reserved1: LONGINT;
  3537.     reserved2: LONGINT;
  3538.     ioCompletion: ProcPtr;
  3539.     ioResult: OSErr;
  3540.     saveA5: LONGINT;
  3541.     reqCode: INTEGER;
  3542.     reserved: ARRAY[1..2] OF LONGINT;
  3543.     serverHint: AddrBlock;
  3544.     dsRefNum: INTEGER;
  3545.     callID: LONGINT;
  3546.     identity: AuthIdentity;
  3547.     gReserved1: LONGINT;
  3548.     gReserved2: LONGINT;
  3549.     gReserved3: LONGINT;
  3550.     clientData: LONGINT;
  3551.  
  3552.     pRLI: PackedRLIPtr;                    {  --> packed RLI whose info is requested }
  3553.     descriptor: DirNodeKind;            { <--  dNode descriptor }
  3554.     networkSpec: NetworkSpecPtr;        { <--  cluster's networkSpec if kIsCluster }
  3555.     END;
  3556.  
  3557.  
  3558. {
  3559. If DnodeNumber is set to a non zero value, path should be set to nil.
  3560. if DnodeNumber is set to zero, pathName should point to a packed path name.
  3561. internetName should be large enough to hold
  3562. the internetName. (If the internetName is same as the one got by
  3563. GetLocalInternetName call, it indicates cluster is reachable  without
  3564. forwarders, --> Tell me if I am wrong)
  3565. }
  3566.  
  3567.  
  3568. {
  3569. DirCreatePersonalDirectory:
  3570. A new  personal directory can be created by specifying an FSSpec for
  3571. the file. If a file already exists dupFNErr will be returned. This call is
  3572. supported 'synchronous' mode only.
  3573. }
  3574.  
  3575. DirCreatePersonalDirectoryPB = RECORD
  3576.     qLink: Ptr;
  3577.     reserved1: LONGINT;
  3578.     reserved2: LONGINT;
  3579.     ioCompletion: ProcPtr;
  3580.     ioResult: OSErr;
  3581.     saveA5: LONGINT;
  3582.     reqCode: INTEGER;
  3583.     reserved: ARRAY[1..2] OF LONGINT;
  3584.     serverHint: AddrBlock;
  3585.     dsRefNum: INTEGER;
  3586.     callID: LONGINT;
  3587.     identity: AuthIdentity;
  3588.     gReserved1: LONGINT;
  3589.     gReserved2: LONGINT;
  3590.     gReserved3: LONGINT;
  3591.     clientData: LONGINT;
  3592.  
  3593.     fsSpec: FSSpecPtr;                    {  --> FSSpec for the PersonalDirectory }
  3594.     fdType: OSType;                        {  --> file type for the PersonalDirectory }
  3595.     fdCreator: OSType;                    {  --> file creator for the PersonalDirectory }
  3596.     END;
  3597.  
  3598.  
  3599. {
  3600. DirOpenPersonalDirectory:
  3601. An existing personal directory can be opened using this call.
  3602. User can specify the personal directory by FSSpec for the AddressBook file.
  3603. 'accessRequested' field specifies open permissions. 'fsRdPerm'  & 'fsRdWrPerm'
  3604. are the only accepted open modes for the address book.
  3605. When the call completes successfully, a dsRefNum will be returned. The 'dsRefNum'
  3606. field is in the DSParamBlockHeader. In addittion 'accessGranted' indicates
  3607. actual permission with personal directory is opened and 'features' indicate the capabilty flags
  3608. associated with the personal directory.
  3609. This call is supported 'synchronous' mode only.
  3610. }
  3611.  
  3612.  
  3613. DirOpenPersonalDirectoryPB = PACKED RECORD
  3614.     qLink: Ptr;
  3615.     reserved1: LONGINT;
  3616.     reserved2: LONGINT;
  3617.     ioCompletion: ProcPtr;
  3618.     ioResult: OSErr;
  3619.     saveA5: LONGINT;
  3620.     reqCode: INTEGER;
  3621.     reserved: ARRAY[1..2] OF LONGINT;
  3622.     serverHint: AddrBlock;
  3623.     dsRefNum: INTEGER;
  3624.     callID: LONGINT;
  3625.     identity: AuthIdentity;
  3626.     gReserved1: LONGINT;
  3627.     gReserved2: LONGINT;
  3628.     gReserved3: LONGINT;
  3629.     clientData: LONGINT;
  3630.  
  3631.     fsSpec: FSSpecPtr;                    {  --> Open an existing PersonalDirectory }
  3632.     accessRequested: CHAR;                {  --> Open: permissions Requested(byte)}
  3633.     accessGranted: CHAR;                {  <-- Open: permissions (byte) (Granted)}
  3634.     features: DirGestalt;                { <--  features for PersonalDirectory }
  3635.     END;
  3636.  
  3637.  
  3638. {
  3639. DirClosePersonalDirectory: This call lets a client close AddressBook opened by DirOpenPersonalDirectory.
  3640. The PersonalDirectory specified by the 'dsRefNum' will be closed.
  3641. This call is supported 'synchronous' mode only.
  3642. }
  3643.  
  3644. DirClosePersonalDirectoryPB = RECORD
  3645.     qLink: Ptr;
  3646.     reserved1: LONGINT;
  3647.     reserved2: LONGINT;
  3648.     ioCompletion: ProcPtr;
  3649.     ioResult: OSErr;
  3650.     saveA5: LONGINT;
  3651.     reqCode: INTEGER;
  3652.     reserved: ARRAY[1..2] OF LONGINT;
  3653.     serverHint: AddrBlock;
  3654.     dsRefNum: INTEGER;
  3655.     callID: LONGINT;
  3656.     identity: AuthIdentity;
  3657.     gReserved1: LONGINT;
  3658.     gReserved2: LONGINT;
  3659.     gReserved3: LONGINT;
  3660.     clientData: LONGINT;
  3661.     END;
  3662.  
  3663.  
  3664. {
  3665. DirMakePersonalDirectoryRLI: With this call a client can make an RLI
  3666. for an PersonalDirectory opened by DirOpenPersonalDirectory Call.
  3667. A packed RLI is created for the PersonalDirectory specified by the 'dsRefNum'.
  3668. If a client has a need to make the AddressBook reference to persistent
  3669. acrross boots it should make use of this call. In the current implementaion
  3670. PackedRLI has an embeeded System7.0 'alias'. If in later time
  3671. If client has a need to make reference to the AddressBook, it must use
  3672. ADAPLibrary call 'DUExtractAlias' and resole the 'alias' to 'FSSpec' and
  3673. make DirOpenPersonalDirectory call to get a 'dsRefNum'.
  3674.   'fromFSSpec'            FSPecPtr from which relative alias to be created. If nil,
  3675.                         absolute alias is created.
  3676.  'pRLIBufferSize' indicates the size of buffer pointed by 'pRLI'
  3677.  'pRLISize'    indicates the actual length of 'pRLI'. If the call
  3678.                         fails with 'kOCEMoreData' error a client can reissue
  3679.                     this call with a larger buffer of this length.
  3680.   'pRLI' is pointer to the buffer in which 'PackedRLI' is
  3681.   returned.
  3682. This call is supported in 'synchronous' mode only.
  3683. }
  3684.  
  3685. DirMakePersonalDirectoryRLIPB = RECORD
  3686.     qLink: Ptr;
  3687.     reserved1: LONGINT;
  3688.     reserved2: LONGINT;
  3689.     ioCompletion: ProcPtr;
  3690.     ioResult: OSErr;
  3691.     saveA5: LONGINT;
  3692.     reqCode: INTEGER;
  3693.     reserved: ARRAY[1..2] OF LONGINT;
  3694.     serverHint: AddrBlock;
  3695.     dsRefNum: INTEGER;
  3696.     callID: LONGINT;
  3697.     identity: AuthIdentity;
  3698.     gReserved1: LONGINT;
  3699.     gReserved2: LONGINT;
  3700.     gReserved3: LONGINT;
  3701.     clientData: LONGINT;
  3702.  
  3703.     fromFSSpec: FSSpecPtr;                {  --> FSSpec for creating relative alia }
  3704.     pRLIBufferSize: INTEGER;            {  --> Length of 'pRLI' buffer }
  3705.     pRLISize: INTEGER;                    { <--  Length of actual 'pRLI' }
  3706.     pRLI: PackedRLIPtr;                    { <--  pRLI for the specified AddressBook }
  3707.     END;
  3708.  
  3709.  
  3710.  
  3711. {****************************************************************************
  3712. The calls described below apply only for DSAM Drivers:
  3713.  
  3714. The following three calls provide capability to Install/Remove a DSAM at RunTime.
  3715.     DirAddDSAM
  3716.     DirRemoveDSAM
  3717.     DirInstantiateDSAM
  3718.  
  3719. The following two calls provide capability to Install/Remove a DSAM Directory at RunTime.
  3720.     DirAddDSAMDirectory
  3721.     DirRemoveDirectory
  3722.  
  3723. DirGetDirectoryIcon call is used by clients to get any special icon associated
  3724. with a DSAM directory.
  3725.  
  3726. ****************************************************************************}
  3727.  
  3728.  
  3729. {
  3730. DirAddDSAM: This call can be used to inorm the availability of a DSAM file
  3731. after discovering the DSAM file.
  3732.     dsamName -> is generic DSAM name e.g. Untitled X.500 directory
  3733.     dsamSignature -> could be generic DSAM kind e.g. 'X500'.
  3734.     fsSpec -> is the FileSpec for the file containing DSAM resources.
  3735. If the call is successfull 'DSAMRecordCID' will be returned. If the
  3736. call returns 'daDSAMRecordCIDExists', record was already there and
  3737. 'dsamRecordCID' will be returned.
  3738. This call can be done only in synchronous mode.
  3739. }
  3740.  
  3741. DirAddDSAMPB = RECORD
  3742.     qLink: Ptr;
  3743.     reserved1: LONGINT;
  3744.     reserved2: LONGINT;
  3745.     ioCompletion: ProcPtr;
  3746.     ioResult: OSErr;
  3747.     saveA5: LONGINT;
  3748.     reqCode: INTEGER;
  3749.     reserved: ARRAY[1..2] OF LONGINT;
  3750.     serverHint: AddrBlock;
  3751.     dsRefNum: INTEGER;
  3752.     callID: LONGINT;
  3753.     identity: AuthIdentity;
  3754.     gReserved1: LONGINT;
  3755.     gReserved2: LONGINT;
  3756.     gReserved3: LONGINT;
  3757.     clientData: LONGINT;
  3758.  
  3759.     dsamRecordCID: CreationID;            { <--  CreationID for the DSAM record }
  3760.     dsamName: RStringPtr;                {  --> DSAM name }
  3761.     dsamKind: OCEDirectoryKind;            {  --> DSAM kind }
  3762.     fsSpec: FSSpecPtr;                    {  --> FSSpec for the file containing DSAM }
  3763.     END;
  3764.  
  3765.  
  3766. {
  3767. DirInstantiateDSAM: This call should be used by the DSAM driver in response
  3768. Driver Open call to indicate the toolbox about the availability of the DSAM.
  3769.     dsamName -> is generic DSAM name e.g. Untitled X.500 directory
  3770.     dsamKind -> could be generic DSAM kind e.g. 'X500'.
  3771.     dsamData -> pointer to private DSAMData. This will be paased back to the DSAM
  3772.     when the DSAM functions (DSAMDirProc, DSAMDirParseProc, DSAMAuthProc) are called.
  3773.     DSAM should already be setup using DirAddDSAM call.
  3774.     DSAMDirProc -> This procedure will be called when  any directory service
  3775.     call intended for the DSAM (other then parse calls)
  3776.     DSAMDirParseProc -> This procedure will be called when any of the parse calls
  3777.     are called.
  3778.     DSAMAuthProc -> This procedure will be called when any of the Authentication Calls
  3779.     are made to the DSAM. If the DSAM does not support authentication, this can be nil.
  3780. This call can be done only in synchronous mode.
  3781. }
  3782.  
  3783. DirInstantiateDSAMPB = RECORD
  3784.     qLink: Ptr;
  3785.     reserved1: LONGINT;
  3786.     reserved2: LONGINT;
  3787.     ioCompletion: ProcPtr;
  3788.     ioResult: OSErr;
  3789.     saveA5: LONGINT;
  3790.     reqCode: INTEGER;
  3791.     reserved: ARRAY[1..2] OF LONGINT;
  3792.     serverHint: AddrBlock;
  3793.     dsRefNum: INTEGER;
  3794.     callID: LONGINT;
  3795.     identity: AuthIdentity;
  3796.     gReserved1: LONGINT;
  3797.     gReserved2: LONGINT;
  3798.     gReserved3: LONGINT;
  3799.     clientData: LONGINT;
  3800.  
  3801.     dsamName: RStringPtr;                {  --> dsamName name }
  3802.     dsamKind: OCEDirectoryKind;            {  --> DSAMKind }
  3803.     dsamData: Ptr;                        {  --> dsamData  }
  3804.     dsamDirProc: ProcPtr;                {  --> of type DSAMDirProc: for directory service calls }
  3805.     dsamDirParseProc: ProcPtr;            {  --> of type DSAMDirParseProc: for directory service parse calls }
  3806.     dsamAuthProc: ProcPtr;                {  --> of type DSAMAuthProc: for authetication service calls }
  3807.     END;
  3808.  
  3809.  
  3810.  
  3811. {
  3812. DirRemoveDSAM: This call can be used to remove  a DSAM file from the OCE Setup.
  3813.     dsamRecordCID -> is the creationID of the DSAM record.
  3814. This call can be made only in synchronous mode.
  3815. }
  3816.  
  3817. DirRemoveDSAMPB = RECORD
  3818.     qLink: Ptr;
  3819.     reserved1: LONGINT;
  3820.     reserved2: LONGINT;
  3821.     ioCompletion: ProcPtr;
  3822.     ioResult: OSErr;
  3823.     saveA5: LONGINT;
  3824.     reqCode: INTEGER;
  3825.     reserved: ARRAY[1..2] OF LONGINT;
  3826.     serverHint: AddrBlock;
  3827.     dsRefNum: INTEGER;
  3828.     callID: LONGINT;
  3829.     identity: AuthIdentity;
  3830.     gReserved1: LONGINT;
  3831.     gReserved2: LONGINT;
  3832.     gReserved3: LONGINT;
  3833.     clientData: LONGINT;
  3834.  
  3835.     dsamRecordCID: CreationID;            { <--  CreationID for the DSAM record }
  3836.     END;
  3837.  
  3838.  
  3839.  
  3840. {
  3841. DirAddDSAMDirectory: This call can be used to inorm the availability of a DSAM directory.
  3842.     dsamRecordCID ->  recordID for the DSAM serving this directory
  3843.     directoryName ->  name of the directory
  3844.     discriminator -> discriminator for the directory
  3845.     directoryRecordCID -> If the call is successful, creationID for the record will
  3846.                             be returned.
  3847. }
  3848.  
  3849. DirAddDSAMDirectoryPB = RECORD
  3850.     qLink: Ptr;
  3851.     reserved1: LONGINT;
  3852.     reserved2: LONGINT;
  3853.     ioCompletion: ProcPtr;
  3854.     ioResult: OSErr;
  3855.     saveA5: LONGINT;
  3856.     reqCode: INTEGER;
  3857.     reserved: ARRAY[1..2] OF LONGINT;
  3858.     serverHint: AddrBlock;
  3859.     dsRefNum: INTEGER;
  3860.     callID: LONGINT;
  3861.     identity: AuthIdentity;
  3862.     gReserved1: LONGINT;
  3863.     gReserved2: LONGINT;
  3864.     gReserved3: LONGINT;
  3865.     clientData: LONGINT;
  3866.  
  3867.     dsamRecordCID: CreationID;            {  --> CreationID for the DSAM record }
  3868.     directoryName: DirectoryNamePtr;    {  --> directory name }
  3869.     discriminator: DirDiscriminator;    {  --> dir discriminator }
  3870.     features: DirGestalt;                {  --> capabilty flags for the directory }
  3871.     directoryRecordCID: CreationID;        { <--  creationID for the directory record }
  3872.     END;
  3873.  
  3874.  
  3875. {
  3876. DirRemoveDirectory: This call can be used to inform the toolbox that
  3877. directory specified by 'directoryRecordCID'
  3878. }
  3879.  
  3880. DirRemoveDirectoryPB = RECORD
  3881.     qLink: Ptr;
  3882.     reserved1: LONGINT;
  3883.     reserved2: LONGINT;
  3884.     ioCompletion: ProcPtr;
  3885.     ioResult: OSErr;
  3886.     saveA5: LONGINT;
  3887.     reqCode: INTEGER;
  3888.     reserved: ARRAY[1..2] OF LONGINT;
  3889.     serverHint: AddrBlock;
  3890.     dsRefNum: INTEGER;
  3891.     callID: LONGINT;
  3892.     identity: AuthIdentity;
  3893.     gReserved1: LONGINT;
  3894.     gReserved2: LONGINT;
  3895.     gReserved3: LONGINT;
  3896.     clientData: LONGINT;
  3897.  
  3898.     directoryRecordCID: CreationID;        {  --> creationID for the directory record }
  3899.     END;
  3900.  
  3901.  
  3902. {
  3903.     DSGetExtendedDirectoriesInfo::  This call can be used to get
  3904.     the information of various foreign directories supported.
  3905.     Typically a DE Template  may make this call to create a
  3906.     Address template or a Gateway may make this call to findout
  3907.     directory name space in which MSAM may would support.
  3908.     Client will supply a buffer pointed by 'bufferPtr' of size 'bufferLength'.
  3909.     When the call completes with 'daMoreData' error, client can examine 'totalEntries'
  3910.     returned and reissue the call with increaing buffer.
  3911.     Toolbox will findout the private information of each of the Foreign Directories
  3912.     by polling DSAM's, Gateways, and MnMServers. The Information returned
  3913.     for each directory will be packed in the format:
  3914.  
  3915.     EachDirectoryData = RECORD
  3916.         pRLI: PackedRLIPtr;                /  packed RLI for the directory
  3917.         entnType: OSType;                /  Entn Type
  3918.         hasMailSlot: LONGINT;            /  If this directory has mail slot this will be 1 otherwise zero
  3919.         RealName: ProtoRString;            /  Packed RString for Real Name (padded to even boundary)
  3920.         comment: ProtoRString;            /  Packed RString holding any comment for Display (padded to even boundary)
  3921.         length: LONGINT;                /  data length
  3922.         data CHAR[1..length];            /  data padded to even boundary
  3923.         END;
  3924.  
  3925.  
  3926.      myData = RECORD
  3927.         data: EacDirectoryData [1..numberOfEntries];    / data packed in the above format
  3928.         END;
  3929.  }
  3930.  
  3931. DirGetExtendedDirectoriesInfoPB = RECORD
  3932.     qLink: Ptr;
  3933.     reserved1: LONGINT;
  3934.     reserved2: LONGINT;
  3935.     ioCompletion: ProcPtr;
  3936.     ioResult: OSErr;
  3937.     saveA5: LONGINT;
  3938.     reqCode: INTEGER;
  3939.     reserved: ARRAY[1..2] OF LONGINT;
  3940.     serverHint: AddrBlock;
  3941.     dsRefNum: INTEGER;
  3942.     callID: LONGINT;
  3943.     identity: AuthIdentity;
  3944.     gReserved1: LONGINT;
  3945.     gReserved2: LONGINT;
  3946.     gReserved3: LONGINT;
  3947.     clientData: LONGINT;
  3948.  
  3949.     buffer: Ptr;                        {  --> Pointer to a buufer where data will be returned }
  3950.     bufferSize: LONGINT;                {  --> Length of the buffer, Length of actual data will be returned here }
  3951.     totalEntries: LONGINT;                { <--  Total Number of Directories found }
  3952.     actualEntries: LONGINT;                { <--  Total Number of Directories entries returned }
  3953.     END;
  3954.  
  3955.  
  3956. {
  3957. DirGetDirectoryIconPB: With this call a client can find out about
  3958. the icons supported by the Directory.
  3959. Both ADAP and PersonalDirectory will not support this call for now.
  3960. A DSAM can support a call so that DE Extension can use this
  3961. call to find appropriate Icons.
  3962. }
  3963.  
  3964. DirGetDirectoryIconPB = RECORD
  3965.     qLink: Ptr;
  3966.     reserved1: LONGINT;
  3967.     reserved2: LONGINT;
  3968.     ioCompletion: ProcPtr;
  3969.     ioResult: OSErr;
  3970.     saveA5: LONGINT;
  3971.     reqCode: INTEGER;
  3972.     reserved: ARRAY[1..2] OF LONGINT;
  3973.     serverHint: AddrBlock;
  3974.     dsRefNum: INTEGER;
  3975.     callID: LONGINT;
  3976.     identity: AuthIdentity;
  3977.     gReserved1: LONGINT;
  3978.     gReserved2: LONGINT;
  3979.     gReserved3: LONGINT;
  3980.     clientData: LONGINT;
  3981.  
  3982.     pRLI: PackedRLIPtr;                    {  --> packed RLI for the directory }
  3983.     iconType: OSType;                    {  --> Type of Icon requested }
  3984.     iconBuffer: Ptr;                    {  --> Buffer to hold Icon Data }
  3985.     bufferSize: LONGINT;                {  <-> size of buffer to hold icon data }
  3986.     END;
  3987.  
  3988.  
  3989. {
  3990. DirGetOCESetupRefNum: This call will return 'dsRefnum' for the OCE Setup PersonalDirectory
  3991. and oceSetupRecordCID for the oceSetup Record.
  3992. Clients interested in manipulating OCE Setup PersonalDirectory directly should
  3993. make this call to get 'dsRefNum'.
  3994. 'dsRefNum' will be returned in the standard field in the AuthDirParamHeader.
  3995. }
  3996.  
  3997. DirGetOCESetupRefNumPB = RECORD
  3998.     qLink: Ptr;
  3999.     reserved1: LONGINT;
  4000.     reserved2: LONGINT;
  4001.     ioCompletion: ProcPtr;
  4002.     ioResult: OSErr;
  4003.     saveA5: LONGINT;
  4004.     reqCode: INTEGER;
  4005.     reserved: ARRAY[1..2] OF LONGINT;
  4006.     serverHint: AddrBlock;
  4007.     dsRefNum: INTEGER;
  4008.     callID: LONGINT;
  4009.     identity: AuthIdentity;
  4010.     gReserved1: LONGINT;
  4011.     gReserved2: LONGINT;
  4012.     gReserved3: LONGINT;
  4013.     clientData: LONGINT;
  4014.  
  4015.     oceSetupRecordCID: CreationID;        { --> creationID for the directory record }
  4016.     END;
  4017.  
  4018.  
  4019.  
  4020.  
  4021. {***************************************************************************}
  4022. { Directory and Authentication control blocks and operation definitions }
  4023.  
  4024. AuthParamBlock = RECORD
  4025.     CASE INTEGER OF
  4026.         1:    (header: AuthDirParamHeader);
  4027.         2:    (bindIdentityPB: AuthBindSpecificIdentityPB);
  4028.         3:    (unbindIdentityPB: AuthUnbindSpecificIdentityPB);
  4029.         4:    (resolveCreationIDPB: AuthResolveCreationIDPB);
  4030.         5:    (getIdentityInfoPB: AuthGetSpecificIdentityInfoPB);
  4031.         6:    (addKeyPB: AuthAddKeyPB);
  4032.         7:    (changeKeyPB: AuthChangeKeyPB);
  4033.         8:    (deleteKeyPB: AuthDeleteKeyPB);
  4034.         9:    (passwordToKeyPB: AuthPasswordToKeyPB);
  4035.         10:    (getCredentialsPB: AuthGetCredentialsPB);
  4036.         11:    (decryptCredentialsPB: AuthDecryptCredentialsPB);
  4037.         12:    (makeChallengePB: AuthMakeChallengePB);
  4038.         13:    (makeReplyPB: AuthMakeReplyPB);
  4039.         14:    (verifyReplyPB: AuthVerifyReplyPB);
  4040.         15:    (getUTCTimePB: AuthGetUTCTimePB);
  4041.         16:    (makeProxyPB: AuthMakeProxyPB);
  4042.         17:    (tradeProxyForCredentialsPB: AuthTradeProxyForCredentialsPB);
  4043.         18:    (getLocalIdentityPB: AuthGetLocalIdentityPB);
  4044.         19:    (unLockLocalIdentityPB: AuthUnlockLocalIdentityPB);
  4045.         20:    (lockLocalIdentityPB: AuthLockLocalIdentityPB);
  4046.         21:    (localIdentityQInstallPB: AuthAddToLocalIdentityQueuePB);
  4047.         22:    (localIdentityQRemovePB: AuthRemoveFromLocalIdentityQueuePB);
  4048.         23:    (setupLocalIdentityPB: AuthSetupLocalIdentityPB);
  4049.         24:    (changeLocalIdentityPB: AuthChangeLocalIdentityPB);
  4050.         25:    (removeLocalIdentityPB: AuthRemoveLocalIdentityPB);
  4051.         26:    (setupDirectoryIdentityPB: OCESetupAddDirectoryInfoPB);
  4052.         27:    (changeDirectoryIdentityPB: OCESetupChangeDirectoryInfoPB);
  4053.         28:    (removeDirectoryIdentityPB: OCESetupRemoveDirectoryInfoPB);
  4054.         29:    (getDirectoryIdentityInfoPB: OCESetupGetDirectoryInfoPB);
  4055.     END;
  4056.  
  4057. AuthParamBlockPtr = ^AuthParamBlock;
  4058.  
  4059.  
  4060. DirParamBlock = RECORD
  4061.     CASE INTEGER OF
  4062.          1:    (header: AuthDirParamHeader);
  4063.          2:    (addRecordPB: DirAddRecordPB);
  4064.          3:    (deleteRecordPB: DirDeleteRecordPB);
  4065.          4:    (enumerateGetPB: DirEnumerateGetPB);
  4066.          5:    (enumerateParsePB: DirEnumerateParsePB);
  4067.          6:    (findRecordGetPB: DirFindRecordGetPB);
  4068.          7:    (findRecordParsePB: DirFindRecordParsePB);
  4069.          8: (lookupGetPB: DirLookupGetPB);
  4070.          9: (lookupParsePB: DirLookupParsePB);
  4071.         10: (addAttributeValuePB: DirAddAttributeValuePB);
  4072.         11: (deleteAttributeTypePB: DirDeleteAttributeTypePB);
  4073.         12: (deleteAttributeValuePB: DirDeleteAttributeValuePB);
  4074.         13: (changeAttributeValuePB: DirChangeAttributeValuePB);
  4075.         14: (verifyAttributeValuePB: DirVerifyAttributeValuePB);
  4076.         15: (findValuePB: DirFindValuePB);
  4077.         16: (enumeratePseudonymGetPB: DirEnumeratePseudonymGetPB);
  4078.         17: (enumeratePseudonymParsePB: DirEnumeratePseudonymParsePB);
  4079.         18: (addPseudonymPB: DirAddPseudonymPB);
  4080.         19: (deletePseudonymPB: DirDeletePseudonymPB);
  4081.         20: (addAliasPB: DirAddAliasPB);
  4082.         21: (enumerateAttributeTypesGetPB: DirEnumerateAttributeTypesGetPB);
  4083.         22: (enumerateAttributeTypesParsePB: DirEnumerateAttributeTypesParsePB);
  4084.         23: (getNameAndTypePB: DirGetNameAndTypePB);
  4085.         24: (setNameAndTypePB: DirSetNameAndTypePB);
  4086.         25: (getRecordMetaInfoPB: DirGetRecordMetaInfoPB);
  4087.         26: (getDNodeMetaInfoPB: DirGetDNodeMetaInfoPB);
  4088.         27: (getDirectoryInfoPB: DirGetDirectoryInfoPB);
  4089.         28: (getDNodeAccessControlGetPB: DirGetDNodeAccessControlGetPB);
  4090.         29: (getDNodeAccessControlParsePB: DirGetDNodeAccessControlParsePB);
  4091.         30: (getRecordAccessControlGetPB: DirGetRecordAccessControlGetPB);
  4092.         31: (getRecordAccessControlParsePB: DirGetRecordAccessControlParsePB);
  4093.         32: (getAttributeAccessControlGetPB: DirGetAttributeAccessControlGetPB);
  4094.         33: (getAttributeAccessControlParsePB: DirGetAttributeAccessControlParsePB);
  4095.         34: (enumerateDirectoriesGetPB: DirEnumerateDirectoriesGetPB);
  4096.         35: (enumerateDirectoriesParsePB: DirEnumerateDirectoriesParsePB);
  4097.         36: (addADAPDirectoryPB: DirAddADAPDirectoryPB);
  4098.         37: (removeDirectoryPB: DirRemoveDirectoryPB);
  4099.         38: (netSearchADAPDirectoriesGetPB: DirNetSearchADAPDirectoriesGetPB);
  4100.         39: (netSearchADAPDirectoriesParsePB: DirNetSearchADAPDirectoriesParsePB);
  4101.         40: (findADAPDirectoryByNetSearchPB: DirFindADAPDirectoryByNetSearchPB);
  4102.         41: (mapDNodeNumberToPathNamePB: DirMapDNodeNumberToPathNamePB);
  4103.         42: (mapPathNameToDNodeNumberPB: DirMapPathNameToDNodeNumberPB);
  4104.         43: (getLocalNetworkSpecPB: DirGetLocalNetworkSpecPB);
  4105.         44: (getDNodeInfoPB: DirGetDNodeInfoPB);
  4106.     
  4107.     { Calls For PersonalDirectoryies }
  4108.         45: (createPersonalDirectoryPB: DirCreatePersonalDirectoryPB);
  4109.         46: (openPersonalDirectoryPB: DirOpenPersonalDirectoryPB);
  4110.         47: (closePersonalDirectoryPB: DirClosePersonalDirectoryPB);
  4111.         48: (makePersonalDirectoryRLIPB: DirMakePersonalDirectoryRLIPB);
  4112.     
  4113.     { Calls For DSAM's }
  4114.         49: (addDSAMPB: DirAddDSAMPB);
  4115.         50: (instantiateDSAMPB: DirInstantiateDSAMPB);
  4116.         51: (removeDSAMPB: DirRemoveDSAMPB);
  4117.         52: (addDSAMDirectoryPB: DirAddDSAMDirectoryPB);
  4118.         53: (getExtendedDirectoriesInfoPB: DirGetExtendedDirectoriesInfoPB);
  4119.         54: (getDirectoryIconPB: DirGetDirectoryIconPB);
  4120.     
  4121.     { Call to dsRefNum for System(Setup: OCE) PersonalDirectory }
  4122.         55: (dirGetOCESetupRefNumPB: DirGetOCESetupRefNumPB);
  4123.     
  4124.     { Abort a aysnchronous call }
  4125.         56: (abortPB: DirAbortPB);
  4126.     END;
  4127.  
  4128. DirParamBlockPtr = ^DirParamBlock;
  4129.  
  4130. DSAMDirProc = ProcPtr;
  4131.     { FUNCTION DSAMDirProc(
  4132.         dsamData: Ptr; paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;}
  4133. DSAMDirParseProc = ProcPtr;
  4134.     { FUNCTION DSAMDirParseProc(
  4135.         dsamData: Ptr; paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;}
  4136. DSAMAuthProc = ProcPtr;
  4137.     { FUNCTION DSAMAuthProc(
  4138.         dsamData: Ptr; pb: AuthParamBlockPtr; async: BOOLEAN): OSErr;}
  4139.  
  4140.  
  4141.  
  4142. {***********************************************************}
  4143. {
  4144. These are the selector values used after the trap dispatch to determine just
  4145. what call the client made to my toolbox.  These bear no relationship to the
  4146. procedure numbers used in the client-to-server protocol.
  4147. }
  4148.  
  4149. { Note:  $21C, $21D are used internally
  4150.  }
  4151.  
  4152. CONST
  4153. kAuthBindSpecificIdentity            = $200;
  4154. kAuthUnbindSpecificIdentity            = $201;
  4155. kAuthResolveCreationID                = $202;
  4156. kAuthGetSpecificIdentityInfo        = $203;
  4157. kAuthGetLocalIdentity                = $204;
  4158.  
  4159. kAuthAddToLocalIdentityQueue        = $205;
  4160. kAuthRemoveFromLocalIdentityQueue    = $206;
  4161.  
  4162. kAuthAddKey                            = $207;
  4163. kAuthChangeKey                        = $208;
  4164. kAuthDeleteKey                        = $209;
  4165. kAuthPasswordToKey                    = $20A;
  4166.  
  4167. kAuthGetCredentials                    = $20B;
  4168. kAuthDecryptCredentials                = $20C;
  4169.  
  4170. kOCESetupRemoveDirectoryInfo        = $20D;
  4171. kOCESetupGetDirectoryInfo            = $20E;
  4172.  
  4173. kAuthMakeChallenge                    = $20F;
  4174. kAuthMakeReply                        = $210;
  4175. kAuthVerifyReply                    = $211;
  4176. kAuthMakeProxy                        = $212;
  4177. kAuthTradeProxyForCredentials        = $213;
  4178.  
  4179. kAuthUnlockLocalIdentity            = $214;
  4180. kAuthLockLocalIdentity                = $215;
  4181. kAuthSetupLocalIdentity                = $216;
  4182.  
  4183. kAuthChangeLocalIdentity            = $217;
  4184. kAuthRemoveLocalIdentity            = $218;
  4185. kOCESetupAddDirectoryInfo            = $219;
  4186.  
  4187. kAuthGetUTCTime                        = $21A;
  4188.  
  4189. kOCESetupChangeDirectoryInfo        = $21B;
  4190.  
  4191. { $100 is used as private command }
  4192.  
  4193.  
  4194. kDirEnumerateParse                    = $101;
  4195. kDirLookupParse                        = $102;
  4196.  
  4197. kDirEnumerateAttributeTypesParse    = $103;
  4198. kDirEnumeratePseudonymParse            = $104;
  4199. kDirNetSearchADAPDirectoriesParse    = $105;
  4200. kDirEnumerateDirectoriesParse        = $106;
  4201.  
  4202. kDirFindADAPDirectoryByNetSearch    = $107;
  4203. kDirNetSearchADAPDirectoriesGet        = $108;
  4204.  
  4205. kDirAddRecord                        = $109;
  4206. kDirDeleteRecord                    = $10A;
  4207. kDirAddAttributeValue                = $10B;
  4208. kDirDeleteAttributeValue            = $10C;
  4209. kDirChangeAttributeValue            = $10D;
  4210. kDirVerifyAttributeValue            = $10E;
  4211. kDirAddPseudonym                    = $10F;
  4212. kDirDeletePseudonym                    = $110;
  4213. kDirEnumerateGet                    = $111;
  4214. kDirEnumerateAttributeTypesGet        = $112;
  4215. kDirEnumeratePseudonymGet            = $113;
  4216. kDirGetNameAndType                    = $114;
  4217. kDirSetNameAndType                    = $115;
  4218.  
  4219. kDirGetRecordMetaInfo                = $116;
  4220. kDirLookupGet                        = $117;
  4221.  
  4222. kDirGetDNodeMetaInfo                = $118;
  4223. kDirGetDirectoryInfo                = $119;
  4224. kDirEnumerateDirectoriesGet            = $11A;
  4225.  
  4226. kDirAbort                            = $11B;
  4227. kDirAddAlias                        = $11C;
  4228.  
  4229.  
  4230. kDirAddDSAM                            = $11D;
  4231. kDirOpenPersonalDirectory            = $11E;
  4232. kDirCreatePersonalDirectory            = $11F;
  4233. kDirRemoveDSAM                        = $120;
  4234. kDirGetDirectoryIcon                = $121;
  4235.  
  4236. kDirMapPathNameToDNodeNumber        = $122;
  4237. kDirMapDNodeNumberToPathName        = $123;
  4238.  
  4239. kDirGetLocalNetworkSpec                = $124;
  4240. kDirGetDNodeInfo                    = $125;
  4241. kDirFindValue                        = $126;
  4242. kDirInstantiateDSAM                    = $127;
  4243. kDirGetOCESetupRefNum                = $128;
  4244.  
  4245. kDirGetDNodeAccessControlGet        = $12A;
  4246. kDirGetRecordAccessControlGet        = $12C;
  4247. kDirGetAttributeAccessControlGet    = $12E;
  4248. kDirGetDNodeAccessControlParse        = $12F;
  4249. kDirDeleteAttributeType                = $130;
  4250.  
  4251. kDirClosePersonalDirectory            = $131;
  4252. kDirMakePersonalDirectoryRLI        = $132;
  4253.  
  4254. kDirAddDSAMDirectory                = $133;
  4255. kDirGetRecordAccessControlParse        = $134;
  4256. kDirRemoveDirectory                    = $135;
  4257. kDirGetExtendedDirectoriesInfo        = $136;
  4258.  
  4259. kDirAddADAPDirectory                = $137;
  4260. kDirGetAttributeAccessControlParse    = $138;
  4261.  
  4262. kDirFindRecordGet                    = $140;
  4263. kDirFindRecordParse                    = $141;
  4264.  
  4265.  
  4266.  
  4267. FUNCTION AuthBindSpecificIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4268.     INLINE $3F3C, kAuthBindSpecificIdentity, _oceTBDispatch;
  4269. FUNCTION AuthUnbindSpecificIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4270.     INLINE $3F3C, kAuthUnbindSpecificIdentity, _oceTBDispatch;
  4271. FUNCTION AuthResolveCreationID(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4272.     INLINE $3F3C, kAuthResolveCreationID, _oceTBDispatch;
  4273. FUNCTION AuthGetSpecificIdentityInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4274.     INLINE $3F3C, kAuthGetSpecificIdentityInfo, _oceTBDispatch;
  4275.  
  4276. FUNCTION AuthAddKey(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4277.     INLINE $3F3C, kAuthAddKey, _oceTBDispatch;
  4278. FUNCTION AuthChangeKey(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4279.     INLINE $3F3C, kAuthChangeKey, _oceTBDispatch;
  4280. FUNCTION AuthDeleteKey(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4281.     INLINE $3F3C, kAuthDeleteKey, _oceTBDispatch;
  4282. FUNCTION AuthPasswordToKey(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4283.     INLINE $3F3C, kAuthPasswordToKey, _oceTBDispatch;
  4284.  
  4285. FUNCTION AuthGetCredentials(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4286.     INLINE $3F3C, kAuthGetCredentials, _oceTBDispatch;
  4287. FUNCTION AuthDecryptCredentials(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4288.     INLINE $3F3C, kAuthDecryptCredentials, _oceTBDispatch;
  4289.  
  4290. FUNCTION AuthMakeChallenge(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4291.     INLINE $3F3C, kAuthMakeChallenge, _oceTBDispatch;
  4292. FUNCTION AuthMakeReply(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4293.     INLINE $3F3C, kAuthMakeReply, _oceTBDispatch;
  4294. FUNCTION AuthVerifyReply(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4295.     INLINE $3F3C, kAuthVerifyReply, _oceTBDispatch;
  4296.  
  4297. FUNCTION AuthGetUTCTime(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4298.     INLINE $3F3C, kAuthGetUTCTime, _oceTBDispatch;
  4299.  
  4300. FUNCTION AuthMakeProxy(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4301.     INLINE $3F3C, kAuthMakeProxy, _oceTBDispatch;
  4302.  
  4303. FUNCTION AuthTradeProxyForCredentials(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4304.     INLINE $3F3C, kAuthTradeProxyForCredentials, _oceTBDispatch;
  4305.  
  4306. { Local Identity API }
  4307. FUNCTION AuthGetLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4308.     INLINE $3F3C, kAuthGetLocalIdentity, _oceTBDispatch;
  4309.  
  4310. FUNCTION AuthUnlockLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4311.     INLINE $3F3C, kAuthUnlockLocalIdentity, _oceTBDispatch;
  4312.  
  4313. FUNCTION AuthLockLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4314.     INLINE $3F3C, kAuthLockLocalIdentity, _oceTBDispatch;
  4315.  
  4316. FUNCTION AuthAddToLocalIdentityQueue(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4317.     INLINE $3F3C, kAuthAddToLocalIdentityQueue, _oceTBDispatch;
  4318.  
  4319. FUNCTION AuthRemoveFromLocalIdentityQueue(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4320.     INLINE $3F3C, kAuthRemoveFromLocalIdentityQueue, _oceTBDispatch;
  4321.  
  4322. FUNCTION AuthSetupLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4323.     INLINE $3F3C, kAuthSetupLocalIdentity, _oceTBDispatch;
  4324.  
  4325. FUNCTION AuthChangeLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4326.     INLINE $3F3C, kAuthChangeLocalIdentity, _oceTBDispatch;
  4327.  
  4328. FUNCTION AuthRemoveLocalIdentity(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4329.     INLINE $3F3C, kAuthRemoveLocalIdentity, _oceTBDispatch;
  4330.  
  4331. FUNCTION OCESetupAddDirectoryInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4332.     INLINE $3F3C, kOCESetupAddDirectoryInfo, _oceTBDispatch;
  4333.  
  4334. FUNCTION OCESetupChangeDirectoryInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4335.     INLINE $3F3C, kOCESetupChangeDirectoryInfo, _oceTBDispatch;
  4336.  
  4337. FUNCTION OCESetupRemoveDirectoryInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4338.     INLINE $3F3C, kOCESetupRemoveDirectoryInfo, _oceTBDispatch;
  4339.  
  4340. FUNCTION OCESetupGetDirectoryInfo(paramBlock: AuthParamBlockPtr; async: BOOLEAN): OSErr;
  4341.     INLINE $3F3C, kOCESetupGetDirectoryInfo, _oceTBDispatch;
  4342.  
  4343.  
  4344.  
  4345. FUNCTION DirAddRecord(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4346.     INLINE $3F3C, kDirAddRecord, _oceTBDispatch;
  4347.  
  4348. FUNCTION DirDeleteRecord(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4349.     INLINE $3F3C, kDirDeleteRecord, _oceTBDispatch;
  4350.  
  4351. FUNCTION DirEnumerateGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4352.     INLINE $3F3C, kDirEnumerateGet, _oceTBDispatch;
  4353.  
  4354. FUNCTION DirEnumerateParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4355.     INLINE $3F3C, kDirEnumerateParse, _oceTBDispatch;
  4356.  
  4357. FUNCTION DirFindRecordGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4358.     INLINE $3F3C, kDirFindRecordGet, _oceTBDispatch;
  4359.  
  4360. FUNCTION DirFindRecordParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4361.     INLINE $3F3C, kDirFindRecordParse, _oceTBDispatch;
  4362.  
  4363. FUNCTION DirLookupGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4364.     INLINE $3F3C, kDirLookupGet, _oceTBDispatch;
  4365.  
  4366. FUNCTION DirLookupParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4367.     INLINE $3F3C, kDirLookupParse, _oceTBDispatch;
  4368.  
  4369. FUNCTION DirAddAttributeValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4370.     INLINE $3F3C, kDirAddAttributeValue, _oceTBDispatch;
  4371.  
  4372. FUNCTION DirDeleteAttributeValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4373.     INLINE $3F3C, kDirDeleteAttributeValue, _oceTBDispatch;
  4374.  
  4375. FUNCTION DirDeleteAttributeType(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4376.     INLINE $3F3C, kDirDeleteAttributeType, _oceTBDispatch;
  4377.  
  4378. FUNCTION DirChangeAttributeValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4379.     INLINE $3F3C, kDirChangeAttributeValue, _oceTBDispatch;
  4380.  
  4381. FUNCTION DirVerifyAttributeValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4382.     INLINE $3F3C, kDirVerifyAttributeValue, _oceTBDispatch;
  4383.  
  4384. FUNCTION DirFindValue(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4385.     INLINE $3F3C, kDirFindValue, _oceTBDispatch;
  4386.  
  4387. FUNCTION DirEnumerateAttributeTypesGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4388.     INLINE $3F3C, kDirEnumerateAttributeTypesGet, _oceTBDispatch;
  4389.  
  4390. FUNCTION DirEnumerateAttributeTypesParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4391.     INLINE $3F3C, kDirEnumerateAttributeTypesParse, _oceTBDispatch;
  4392.  
  4393. FUNCTION DirAddPseudonym(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4394.     INLINE $3F3C, kDirAddPseudonym, _oceTBDispatch;
  4395.  
  4396. FUNCTION DirDeletePseudonym(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4397.     INLINE $3F3C, kDirDeletePseudonym, _oceTBDispatch;
  4398.  
  4399. FUNCTION DirAddAlias(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4400.     INLINE $3F3C, kDirAddAlias, _oceTBDispatch;
  4401.  
  4402. FUNCTION DirEnumeratePseudonymGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4403.     INLINE $3F3C, kDirEnumeratePseudonymGet, _oceTBDispatch;
  4404.  
  4405. FUNCTION DirEnumeratePseudonymParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4406.     INLINE $3F3C, kDirEnumeratePseudonymParse, _oceTBDispatch;
  4407.  
  4408. FUNCTION DirGetNameAndType(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4409.     INLINE $3F3C, kDirGetNameAndType, _oceTBDispatch;
  4410.  
  4411. FUNCTION DirSetNameAndType(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4412.     INLINE $3F3C, kDirSetNameAndType, _oceTBDispatch;
  4413.  
  4414. FUNCTION DirGetRecordMetaInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4415.     INLINE $3F3C, kDirGetRecordMetaInfo, _oceTBDispatch;
  4416.  
  4417. FUNCTION DirGetDNodeMetaInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4418.     INLINE $3F3C, kDirGetDNodeMetaInfo, _oceTBDispatch;
  4419.  
  4420. FUNCTION DirGetDirectoryInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4421.     INLINE $3F3C, kDirGetDirectoryInfo, _oceTBDispatch;
  4422.  
  4423. FUNCTION DirGetDNodeAccessControlGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4424.     INLINE $3F3C, kDirGetDNodeAccessControlGet, _oceTBDispatch;
  4425.  
  4426. FUNCTION DirGetDNodeAccessControlParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4427.     INLINE $3F3C, kDirGetDNodeAccessControlParse, _oceTBDispatch;
  4428.  
  4429. FUNCTION DirGetRecordAccessControlGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4430.     INLINE $3F3C, kDirGetRecordAccessControlGet, _oceTBDispatch;
  4431.  
  4432. FUNCTION DirGetRecordAccessControlParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4433.     INLINE $3F3C, kDirGetRecordAccessControlParse, _oceTBDispatch;
  4434.  
  4435. FUNCTION DirGetAttributeAccessControlGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4436.     INLINE $3F3C, kDirGetAttributeAccessControlGet, _oceTBDispatch;
  4437.  
  4438. FUNCTION DirGetAttributeAccessControlParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4439.     INLINE $3F3C, kDirGetAttributeAccessControlParse, _oceTBDispatch;
  4440.  
  4441. FUNCTION DirEnumerateDirectoriesGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4442.     INLINE $3F3C, kDirEnumerateDirectoriesGet, _oceTBDispatch;
  4443.  
  4444. FUNCTION DirEnumerateDirectoriesParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4445.     INLINE $3F3C, kDirEnumerateDirectoriesParse, _oceTBDispatch;
  4446.  
  4447. FUNCTION DirMapPathNameToDNodeNumber(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4448.     INLINE $3F3C, kDirMapPathNameToDNodeNumber, _oceTBDispatch;
  4449.  
  4450. FUNCTION DirMapDNodeNumberToPathName(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4451.     INLINE $3F3C, kDirMapDNodeNumberToPathName, _oceTBDispatch;
  4452.  
  4453.  
  4454. FUNCTION DirGetLocalNetworkSpec(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4455.     INLINE $3F3C, kDirGetLocalNetworkSpec, _oceTBDispatch;
  4456.  
  4457. FUNCTION DirGetDNodeInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4458.     INLINE $3F3C, kDirGetDNodeInfo, _oceTBDispatch;
  4459.  
  4460.  
  4461. {  Trap Dispatchers for Personal Address Book and DSAM Extensions }
  4462.  
  4463. FUNCTION DirCreatePersonalDirectory(paramBlock: DirParamBlockPtr): OSErr;
  4464.     INLINE $7000, $1f00, $3F3C, kDirCreatePersonalDirectory, _oceTBDispatch;
  4465.  
  4466. FUNCTION DirOpenPersonalDirectory(paramBlock: DirParamBlockPtr): OSErr;
  4467.     INLINE $7000, $1f00, $3F3C, kDirOpenPersonalDirectory, _oceTBDispatch;
  4468.  
  4469. FUNCTION DirClosePersonalDirectory(paramBlock: DirParamBlockPtr): OSErr;
  4470.     INLINE $7000, $1f00, $3F3C, kDirClosePersonalDirectory, _oceTBDispatch;
  4471.  
  4472. FUNCTION DirMakePersonalDirectoryRLI(paramBlock: DirParamBlockPtr): OSErr;
  4473.     INLINE $7000, $1f00, $3F3C, kDirMakePersonalDirectoryRLI, _oceTBDispatch;
  4474.  
  4475. FUNCTION DirAddDSAM(paramBlock: DirParamBlockPtr): OSErr;
  4476.     INLINE $7000, $1f00, $3F3C, kDirAddDSAM, _oceTBDispatch;
  4477.  
  4478. FUNCTION DirInstantiateDSAM(paramBlock: DirParamBlockPtr): OSErr;
  4479.     INLINE $7000, $1f00, $3F3C, kDirInstantiateDSAM, _oceTBDispatch;
  4480.  
  4481.  
  4482. FUNCTION DirRemoveDSAM(paramBlock: DirParamBlockPtr): OSErr;
  4483.     INLINE $7000, $1f00, $3F3C, kDirRemoveDSAM, _oceTBDispatch;
  4484.  
  4485. FUNCTION DirAddDSAMDirectory(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4486.     INLINE $3F3C, kDirAddDSAMDirectory, _oceTBDispatch;
  4487.  
  4488. FUNCTION DirGetExtendedDirectoriesInfo(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4489.     INLINE $3F3C, kDirGetExtendedDirectoriesInfo, _oceTBDispatch;
  4490.  
  4491. FUNCTION DirGetDirectoryIcon(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4492.     INLINE $3F3C, kDirGetDirectoryIcon, _oceTBDispatch;
  4493.  
  4494.  
  4495. FUNCTION DirAddADAPDirectory(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4496.     INLINE $3F3C, kDirAddADAPDirectory, _oceTBDispatch;
  4497.  
  4498. FUNCTION DirRemoveDirectory(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4499.     INLINE $3F3C, kDirRemoveDirectory, _oceTBDispatch;
  4500.  
  4501. FUNCTION DirNetSearchADAPDirectoriesGet(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4502.     INLINE $3F3C, kDirNetSearchADAPDirectoriesGet, _oceTBDispatch;
  4503.  
  4504. FUNCTION DirNetSearchADAPDirectoriesParse(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4505.     INLINE $3F3C, kDirNetSearchADAPDirectoriesParse, _oceTBDispatch;
  4506.  
  4507. FUNCTION DirFindADAPDirectoryByNetSearch(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4508.     INLINE $3F3C, kDirFindADAPDirectoryByNetSearch, _oceTBDispatch;
  4509.  
  4510. FUNCTION DirGetOCESetupRefNum(paramBlock: DirParamBlockPtr; async: BOOLEAN): OSErr;
  4511.     INLINE $3F3C, kDirGetOCESetupRefNum, _oceTBDispatch;
  4512.  
  4513. FUNCTION DirAbort(paramBlock: DirParamBlockPtr): OSErr;
  4514.     INLINE $7000, $1f00, $3F3C, kDirAbort, _oceTBDispatch;
  4515.  
  4516.  
  4517.  
  4518.  
  4519. {$ENDC}    { UsingOCEAuthDir }
  4520.  
  4521. {$IFC NOT UsingIncludes}
  4522.     END.
  4523. {$ENDC}
  4524.